Author: fireball Date: Mon Nov 17 10:09:31 2008 New Revision: 37409
URL: http://svn.reactos.org/svn/reactos?rev=37409&view=rev Log: - 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.
Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c
Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat... ============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] Mon Nov 17 10:09:31 2008 @@ -372,6 +372,7 @@ 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 @@ }
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 @@ 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)) {