Author: cgutman
Date: Sun Dec 14 09:27:11 2014
New Revision: 65635
URL:
http://svn.reactos.org/svn/reactos?rev=65635&view=rev
Log:
[CDFS]
- Fix CD-ROM disc change handling
- Fixes CORE-6119
Modified:
trunk/reactos/drivers/filesystems/cdfs/create.c
trunk/reactos/drivers/filesystems/cdfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/cdfs/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/create.c [iso-8859-1] Sun Dec 14 09:27:11 2014
@@ -140,10 +140,6 @@
DPRINT ("Status %lx\n", Status);
if (!NT_SUCCESS(Status))
{
- if (Status == STATUS_NO_MEDIA_IN_DEVICE || Status == STATUS_VERIFY_REQUIRED)
- {
- DeviceExt->VolumeDevice->Flags |= DO_VERIFY_VOLUME;
- }
DPRINT1 ("Status %lx\n", Status);
return Status;
}
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] Sun Dec 14 09:27:11 2014
@@ -453,34 +453,25 @@
PIRP Irp)
{
PDEVICE_EXTENSION DeviceExt;
- PDEVICE_OBJECT DeviceToVerify;
PIO_STACK_LOCATION Stack;
NTSTATUS Status;
CDINFO CdInfo;
-
PLIST_ENTRY Entry;
PFCB Fcb;
+ PVPB VpbToVerify;
DPRINT1 ("CdfsVerifyVolume() called\n");
-#if 0
- if (DeviceObject != CdfsGlobalData->DeviceObject)
- {
- DPRINT1("DeviceObject != CdfsGlobalData->DeviceObject\n");
- return(STATUS_INVALID_DEVICE_REQUEST);
- }
-#endif
-
DeviceExt = DeviceObject->DeviceExtension;
Stack = IoGetCurrentIrpStackLocation (Irp);
- DeviceToVerify = Stack->Parameters.VerifyVolume.DeviceObject;
+ VpbToVerify = Stack->Parameters.VerifyVolume.Vpb;
FsRtlEnterFileSystem();
ExAcquireResourceExclusiveLite (&DeviceExt->VcbResource,
TRUE);
- if (!(DeviceToVerify->Flags & DO_VERIFY_VOLUME))
+ if (!(VpbToVerify->RealDevice->Flags & DO_VERIFY_VOLUME))
{
DPRINT1 ("Volume has been verified!\n");
ExReleaseResourceLite (&DeviceExt->VcbResource);
@@ -488,14 +479,14 @@
return STATUS_SUCCESS;
}
- DPRINT1 ("Device object %p Device to verify %p\n", DeviceObject,
DeviceToVerify);
-
- Status = CdfsGetVolumeData (DeviceToVerify,
+ DPRINT1("Device object %p Device to verify %p\n", DeviceObject,
VpbToVerify->RealDevice);
+
+ Status = CdfsGetVolumeData(VpbToVerify->RealDevice,
&CdInfo);
if (NT_SUCCESS(Status) &&
- CdInfo.SerialNumber == DeviceToVerify->Vpb->SerialNumber &&
- CdInfo.VolumeLabelLength == DeviceToVerify->Vpb->VolumeLabelLength
&&
- !wcsncmp (CdInfo.VolumeLabel, DeviceToVerify->Vpb->VolumeLabel,
CdInfo.VolumeLabelLength))
+ CdInfo.SerialNumber == VpbToVerify->SerialNumber &&
+ CdInfo.VolumeLabelLength == VpbToVerify->VolumeLabelLength &&
+ !wcsncmp(CdInfo.VolumeLabel, VpbToVerify->VolumeLabel,
CdInfo.VolumeLabelLength))
{
DPRINT1 ("Same volume!\n");
@@ -520,7 +511,7 @@
Status = STATUS_WRONG_VOLUME;
}
- DeviceToVerify->Flags &= ~DO_VERIFY_VOLUME;
+ VpbToVerify->RealDevice->Flags &= ~DO_VERIFY_VOLUME;
ExReleaseResourceLite (&DeviceExt->VcbResource);
FsRtlExitFileSystem();