mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:32:57 +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
1 changed files with 22 additions and 1 deletions
|
@ -479,6 +479,15 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject,
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (Status == STATUS_FS_DRIVER_REQUIRED)
|
||||||
{
|
{
|
||||||
/* We need to release the lock */
|
/* We need to release the lock */
|
||||||
|
@ -497,7 +506,6 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject,
|
||||||
if (!DeviceIsLocked)
|
if (!DeviceIsLocked)
|
||||||
{
|
{
|
||||||
/* Lock it ourselves */
|
/* Lock it ourselves */
|
||||||
DPRINT1("Waiting\n");
|
|
||||||
Status = KeWaitForSingleObject(&DeviceObject->
|
Status = KeWaitForSingleObject(&DeviceObject->
|
||||||
DeviceLock,
|
DeviceLock,
|
||||||
Executive,
|
Executive,
|
||||||
|
@ -531,6 +539,19 @@ IopMountVolume(IN PDEVICE_OBJECT DeviceObject,
|
||||||
LocalList.Flink = FsList->Flink;
|
LocalList.Flink = FsList->Flink;
|
||||||
ListEntry = &LocalList;
|
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 */
|
/* Go to the next FS entry */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue