- Call ChkDsk function with NT pathname, not DOS pathname.

svn path=/trunk/; revision=35105
This commit is contained in:
Aleksey Bragin 2008-08-04 16:08:03 +00:00
parent 799a04653b
commit befc1d3a5a

View file

@ -277,6 +277,7 @@ CheckVolume(
ANSI_STRING ChkdskFunctionName = RTL_CONSTANT_STRING("ChkdskEx");
PVOID Provider;
CHKDSKEX ChkdskFunc;
WCHAR NtDrivePath[64];
UNICODE_STRING DrivePathU;
NTSTATUS Status;
@ -315,7 +316,11 @@ CheckVolume(
/* Call provider */
//PrintString(" Verifying volume %S\n", DrivePath);
RtlInitUnicodeString(&DrivePathU, DrivePath);
swprintf(NtDrivePath, L"\\??\\");
wcscat(NtDrivePath, DrivePath);
NtDrivePath[wcslen(NtDrivePath)-1] = 0;
RtlInitUnicodeString(&DrivePathU, NtDrivePath);
Status = ChkdskFunc(&DrivePathU,
TRUE, // FixErrors
TRUE, // Verbose