From bedd8fa9be0cec77c984687941e09ce6d2b73740 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Wed, 29 Oct 2014 23:10:31 +0000 Subject: [PATCH] [FASTFAT] Now that we start to honor the storage stack (ie, without the IopParseDevice hack ;-)), we have to let FSDs forward device IOCTLs. This allows back copying files on 1st stage svn path=/trunk/; revision=65116 --- reactos/drivers/filesystems/fastfat/iface.c | 1 + reactos/drivers/filesystems/fastfat/misc.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/reactos/drivers/filesystems/fastfat/iface.c b/reactos/drivers/filesystems/fastfat/iface.c index 03ddfe887fd..b6d61430b51 100644 --- a/reactos/drivers/filesystems/fastfat/iface.c +++ b/reactos/drivers/filesystems/fastfat/iface.c @@ -99,6 +99,7 @@ DriverEntry( DriverObject->MajorFunction[IRP_MJ_SET_VOLUME_INFORMATION] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = VfatShutdown; DriverObject->MajorFunction[IRP_MJ_LOCK_CONTROL] = VfatBuildRequest; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_CLEANUP] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_PNP] = VfatBuildRequest; diff --git a/reactos/drivers/filesystems/fastfat/misc.c b/reactos/drivers/filesystems/fastfat/misc.c index b48ac9028a9..ddd547ff8fe 100644 --- a/reactos/drivers/filesystems/fastfat/misc.c +++ b/reactos/drivers/filesystems/fastfat/misc.c @@ -93,6 +93,16 @@ Fail: return Status; } +static +NTSTATUS +VfatDeviceControl( + IN PVFAT_IRP_CONTEXT IrpContext) +{ + IoSkipCurrentIrpStackLocation(IrpContext->Irp); + + return IoCallDriver(IrpContext->DeviceExt->StorageDevice, IrpContext->Irp); +} + static NTSTATUS VfatDispatchRequest( @@ -127,6 +137,8 @@ VfatDispatchRequest( return VfatSetVolumeInformation(IrpContext); case IRP_MJ_LOCK_CONTROL: return VfatLockControl(IrpContext); + case IRP_MJ_DEVICE_CONTROL: + return VfatDeviceControl(IrpContext); case IRP_MJ_CLEANUP: return VfatCleanup(IrpContext); case IRP_MJ_FLUSH_BUFFERS: