mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[CHKDSK] Don't continue repair if volume is in use
This makes use of previous commit vfatlib improvements that allow caller to stop chkdsk if locking fail, which will happen if volume is in use. That way, ReactOS users won't be able any longer to f*** up their C:\ volume by attempting to chkdsk -f it! CORE-14087
This commit is contained in:
parent
6a224a38a1
commit
48250aef6e
1 changed files with 5 additions and 2 deletions
|
@ -228,6 +228,7 @@ ChkdskCallback(
|
|||
DWORD Modifier,
|
||||
PVOID Argument)
|
||||
{
|
||||
BOOLEAN Ret;
|
||||
PDWORD percent;
|
||||
PBOOLEAN status;
|
||||
PTEXTOUTPUT output;
|
||||
|
@ -236,6 +237,7 @@ ChkdskCallback(
|
|||
// We get other types of commands,
|
||||
// but we don't have to pay attention to them
|
||||
//
|
||||
Ret = TRUE;
|
||||
switch (Command)
|
||||
{
|
||||
case UNKNOWN2:
|
||||
|
@ -259,7 +261,8 @@ ChkdskCallback(
|
|||
break;
|
||||
|
||||
case VOLUMEINUSE:
|
||||
ConPuts(StdOut, L"VOLUMEINUSE\n");
|
||||
ConPuts(StdOut, L"Volume is in use and cannot be locked\n");
|
||||
Ret = FALSE;
|
||||
break;
|
||||
|
||||
case UNKNOWN9:
|
||||
|
@ -313,7 +316,7 @@ ChkdskCallback(
|
|||
}
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return Ret;
|
||||
}
|
||||
|
||||
#ifndef FMIFS_IMPORT_DLL
|
||||
|
|
Loading…
Reference in a new issue