diff --git a/dll/win32/fmifs/chkdsk.c b/dll/win32/fmifs/chkdsk.c index 5a24a3f8645..aa7ec755ab5 100644 --- a/dll/win32/fmifs/chkdsk.c +++ b/dll/win32/fmifs/chkdsk.c @@ -51,12 +51,17 @@ Chkdsk( goto Quit; } +#ifdef __REACTOS__ + /* We really just want to use the disk drive letter */ + wcscpy(VolumeName, DriveName); +#else if (!GetVolumeNameForVolumeMountPointW(DriveName, VolumeName, ARRAYSIZE(VolumeName))) { /* Couldn't get a volume GUID path, try checking using a parameter provided path */ DPRINT1("Couldn't get a volume GUID path for drive %S\n", DriveName); wcscpy(VolumeName, DriveName); } +#endif if (!RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, NULL)) goto Quit; diff --git a/sdk/lib/fslib/vfatlib/check/io.c b/sdk/lib/fslib/vfatlib/check/io.c index 6e4bea2b799..b60ba05f746 100644 --- a/sdk/lib/fslib/vfatlib/check/io.c +++ b/sdk/lib/fslib/vfatlib/check/io.c @@ -186,7 +186,7 @@ NTSTATUS fs_open(PUNICODE_STRING DriveRoot, int read_write) FILE_GENERIC_READ | (read_write ? FILE_GENERIC_WRITE : 0), &ObjectAttributes, &Iosb, - read_write ? 0 : FILE_SHARE_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_ALERT); if (!NT_SUCCESS(Status)) { diff --git a/sdk/lib/fslib/vfatlib/vfatlib.c b/sdk/lib/fslib/vfatlib/vfatlib.c index d31832f863a..432c9e671aa 100644 --- a/sdk/lib/fslib/vfatlib/vfatlib.c +++ b/sdk/lib/fslib/vfatlib/vfatlib.c @@ -432,6 +432,7 @@ VfatChkdsk( ULONG free_clusters; DOS_FS fs; NTSTATUS Status; + WCHAR DriveLetter[2] = L"0"; UNREFERENCED_PARAMETER(pUnknown1); UNREFERENCED_PARAMETER(pUnknown2); @@ -544,9 +545,21 @@ VfatChkdsk( } } +#ifdef __REACTOS__ + if (DriveRoot->Buffer[0] == '\\' && DriveRoot->Buffer[1] == '?' && + DriveRoot->Buffer[2] == '?' && DriveRoot->Buffer[3] == '\\') + { + VfatPrint("Chkdsk complete for Volume %S:\n", DriveLetter); + VfatPrint("%ld clusters on the disk\n", fs.data_clusters); + VfatPrint("%ld clusters available on the disk\n", free_clusters); + } + else + VfatPrint("%wZ: %u files, %lu/%lu clusters\n", DriveRoot, + FsCheckTotalFiles, fs.data_clusters - free_clusters, fs.data_clusters); +#else VfatPrint("%wZ: %u files, %lu/%lu clusters\n", DriveRoot, FsCheckTotalFiles, fs.data_clusters - free_clusters, fs.data_clusters); - +#endif if (FsCheckFlags & FSCHECK_READ_WRITE) { /* Dismount the volume */