mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 02:37:06 +00:00
- 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
This commit is contained in:
parent
4aa4129e6f
commit
6bad7297f7
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue