mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 00:43:21 +00:00
- Use IoIsErrorUserInoduced to check if we couldn't mount the device because it was not actually inserted, was unrocognized, write-protected, etc... and completely break out of the mounting procedure if so.
- Also use FsRtlIsTotalDeviceFailure to check if the error was a fatal device error (like a CRC error) and abandon mounting in this case as well. svn path=/trunk/; revision=22765
This commit is contained in:
parent
23be4d46c6
commit
ff429eb9f3
|
@ -479,6 +479,15 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Check if we failed because of the user */
|
||||
if ((IoIsErrorUserInduced(Status)) &&
|
||||
(IoStatusBlock.Information == 1))
|
||||
{
|
||||
/* Break out and fail */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Otherwise, check if we need to load the FS driver */
|
||||
if (Status == STATUS_FS_DRIVER_REQUIRED)
|
||||
{
|
||||
/* We need to release the lock */
|
||||
|
@ -497,7 +506,6 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject,
|
|||
if (!DeviceIsLocked)
|
||||
{
|
||||
/* Lock it ourselves */
|
||||
DPRINT1("Waiting\n");
|
||||
Status = KeWaitForSingleObject(&DeviceObject->
|
||||
DeviceLock,
|
||||
Executive,
|
||||
|
@ -531,6 +539,19 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject,
|
|||
LocalList.Flink = FsList->Flink;
|
||||
ListEntry = &LocalList;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if we failed with any other error then an unrecognized
|
||||
* volume, and if this request doesn't allow mounting the raw
|
||||
* file system.
|
||||
*/
|
||||
if (!(AllowRawMount) &&
|
||||
(Status != STATUS_UNRECOGNIZED_VOLUME) &&
|
||||
(FsRtlIsTotalDeviceFailure(Status)))
|
||||
{
|
||||
/* Break out and give up */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Go to the next FS entry */
|
||||
|
|
Loading…
Reference in a new issue