From 380b1db222d9adc025314948157414b3914536a0 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 29 Dec 2000 13:45:01 +0000 Subject: [PATCH] Implemented shutdown routine dummy svn path=/trunk/; revision=1485 --- reactos/drivers/fs/vfat/iface.c | 4 ++- reactos/drivers/fs/vfat/makefile | 4 +-- reactos/drivers/fs/vfat/shutdown.c | 42 ++++++++++++++++++++++++++++++ reactos/drivers/fs/vfat/vfat.h | 7 ++++- 4 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 reactos/drivers/fs/vfat/shutdown.c diff --git a/reactos/drivers/fs/vfat/iface.c b/reactos/drivers/fs/vfat/iface.c index cc206199400..b62dd42d29e 100644 --- a/reactos/drivers/fs/vfat/iface.c +++ b/reactos/drivers/fs/vfat/iface.c @@ -1,4 +1,4 @@ -/* $Id: iface.c,v 1.43 2000/09/12 10:12:13 jean Exp $ +/* $Id: iface.c,v 1.44 2000/12/29 13:45:01 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -230,6 +230,8 @@ NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT _DriverObject, FsdDirectoryControl; VfatDriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] = VfatQueryVolumeInformation; + VfatDriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = + VfatShutdown; VfatDriverObject->DriverUnload = NULL; diff --git a/reactos/drivers/fs/vfat/makefile b/reactos/drivers/fs/vfat/makefile index 7702bd49cb0..12713bcf749 100644 --- a/reactos/drivers/fs/vfat/makefile +++ b/reactos/drivers/fs/vfat/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.23 2000/11/20 19:59:11 ekohl Exp $ +# $Id: makefile,v 1.24 2000/12/29 13:45:01 ekohl Exp $ # # PATH_TO_TOP = ../../.. @@ -6,7 +6,7 @@ PATH_TO_TOP = ../../.. TARGET=vfatfs OBJECTS = blockdev.o close.o create.o dir.o dirwr.o iface.o string.o fat.o \ - rw.o finfo.o volume.o $(TARGET).coff + rw.o finfo.o volume.o shutdown.o $(TARGET).coff LIBS = ../../../ntoskrnl/ntoskrnl.a CFLAGS = diff --git a/reactos/drivers/fs/vfat/shutdown.c b/reactos/drivers/fs/vfat/shutdown.c new file mode 100644 index 00000000000..313cda2762e --- /dev/null +++ b/reactos/drivers/fs/vfat/shutdown.c @@ -0,0 +1,42 @@ +/* $Id: shutdown.c,v 1.1 2000/12/29 13:45:01 ekohl Exp $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/vfat/shutdown.c + * PURPOSE: VFAT Filesystem + * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) + */ + +/* INCLUDES *****************************************************************/ + +#include + +//#define NDEBUG +#include + +#include "vfat.h" + +/* FUNCTIONS ****************************************************************/ + +NTSTATUS STDCALL +VfatShutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp) +{ + PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp); + PFILE_OBJECT FileObject = Stack->FileObject; + PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; + NTSTATUS Status; + + DPRINT("VfatShutdown(DeviceObject %x, Irp %x)\n",DeviceObject, Irp); + + /* FIXME: Shut down the file system */ + + Status = STATUS_SUCCESS; + + Irp->IoStatus.Status = Status; + Irp->IoStatus.Information = 0; + + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return(Status); +} + +/* EOF */ diff --git a/reactos/drivers/fs/vfat/vfat.h b/reactos/drivers/fs/vfat/vfat.h index 8c686742b89..ea906bda3c4 100644 --- a/reactos/drivers/fs/vfat/vfat.h +++ b/reactos/drivers/fs/vfat/vfat.h @@ -1,4 +1,4 @@ -/* $Id: vfat.h,v 1.17 2000/09/12 10:12:13 jean Exp $ */ +/* $Id: vfat.h,v 1.18 2000/12/29 13:45:01 ekohl Exp $ */ struct _BootSector { unsigned char magic0, res0, magic1; @@ -236,3 +236,8 @@ NTSTATUS STDCALL VfatSetInformation(PDEVICE_OBJECT DeviceObject, PIRP Irp); * From create.c */ NTSTATUS ReadVolumeLabel(PDEVICE_EXTENSION DeviceExt, PVPB Vpb); + +/* + * functions from shutdown.c + */ +NTSTATUS STDCALL VfatShutdown(PDEVICE_OBJECT DeviceObject, PIRP Irp);