[ros-diffs] [fireball] 35105: - Call ChkDsk function with NT pathname, not DOS pathname.

fireball at svn.reactos.org fireball at svn.reactos.org
Mon Aug 4 18:08:04 CEST 2008


Author: fireball
Date: Mon Aug  4 11:08:03 2008
New Revision: 35105

URL: http://svn.reactos.org/svn/reactos?rev=35105&view=rev
Log:
- Call ChkDsk function with NT pathname, not DOS pathname.

Modified:
    trunk/reactos/base/system/autochk/autochk.c

Modified: trunk/reactos/base/system/autochk/autochk.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/autochk/autochk.c?rev=35105&r1=35104&r2=35105&view=diff
==============================================================================
--- trunk/reactos/base/system/autochk/autochk.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/autochk/autochk.c [iso-8859-1] Mon Aug  4 11:08:03 2008
@@ -277,6 +277,7 @@
     ANSI_STRING ChkdskFunctionName = RTL_CONSTANT_STRING("ChkdskEx");
     PVOID Provider;
     CHKDSKEX ChkdskFunc;
+    WCHAR NtDrivePath[64];
     UNICODE_STRING DrivePathU;
     NTSTATUS Status;
 
@@ -315,7 +316,11 @@
 
     /* 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



More information about the Ros-diffs mailing list