From 6bad7297f7a55c5c1528c2a296959ca449caee99 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 17 Nov 2008 16:09:31 +0000 Subject: [PATCH] - Target device to mount may not have VPB, the driver should get the VPB passed in parameters. - Set target device's VPB to this value. This should not really be done, however our driver heavily depends on target device having this VPB. I don't see any side effects. - With these changes, Windows 2003 is able to boot up to desktop and cleanly shutdown using this driver. svn path=/trunk/; revision=37409 --- reactos/drivers/filesystems/fastfat/fsctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/fastfat/fsctl.c b/reactos/drivers/filesystems/fastfat/fsctl.c index e5a612f628e..05e26293863 100644 --- a/reactos/drivers/filesystems/fastfat/fsctl.c +++ b/reactos/drivers/filesystems/fastfat/fsctl.c @@ -372,6 +372,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) PVFATFCB VolumeFcb = NULL; PVFATCCB Ccb = NULL; PDEVICE_OBJECT DeviceToMount; + PVPB Vpb; UNICODE_STRING NameU = RTL_CONSTANT_STRING(L"\\$$Fat$$"); UNICODE_STRING VolumeNameU = RTL_CONSTANT_STRING(L"\\$$Volume$$"); ULONG HashTableSize; @@ -389,6 +390,7 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) } DeviceToMount = IrpContext->Stack->Parameters.MountVolume.DeviceObject; + Vpb = IrpContext->Stack->Parameters.MountVolume.Vpb; Status = VfatHasFileSystem (DeviceToMount, &RecognizedFS, &FatInfo); if (!NT_SUCCESS(Status)) @@ -438,7 +440,9 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) DeviceExt->HashTableSize = HashTableSize; /* use same vpb as device disk */ - DeviceObject->Vpb = DeviceToMount->Vpb; + DeviceObject->Vpb = Vpb; + DeviceToMount->Vpb = Vpb; + Status = VfatMountDevice(DeviceExt, DeviceToMount); if (!NT_SUCCESS(Status)) {