- Call ChkDsk function with NT pathname, not DOS pathname.
authorAleksey Bragin <aleksey@reactos.org>
Mon, 4 Aug 2008 16:08:03 +0000 (16:08 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Mon, 4 Aug 2008 16:08:03 +0000 (16:08 +0000)
svn path=/trunk/; revision=35105

reactos/base/system/autochk/autochk.c

index 8fa15d4..b0de270 100644 (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