mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
Add a hack to enable formatting (was broken since at least r20156)
svn path=/trunk/; revision=23919
This commit is contained in:
parent
478f24b02b
commit
aa34958d1b
|
@ -35,7 +35,7 @@ FormatEx(
|
|||
UNICODE_STRING usLabel;
|
||||
BOOLEAN Argument = FALSE;
|
||||
WCHAR VolumeName[MAX_PATH];
|
||||
CURDIR CurDir;
|
||||
//CURDIR CurDir;
|
||||
|
||||
Provider = GetProvider(Format);
|
||||
if (!Provider)
|
||||
|
@ -48,6 +48,12 @@ FormatEx(
|
|||
return;
|
||||
}
|
||||
|
||||
#if 1
|
||||
DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n");
|
||||
swprintf(VolumeName, L"\\\\.\\%c:", DriveRoot[0]);
|
||||
RtlCreateUnicodeString(&usDriveRoot, VolumeName);
|
||||
/* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */
|
||||
#else
|
||||
if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH)
|
||||
|| !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir))
|
||||
{
|
||||
|
@ -58,10 +64,11 @@ FormatEx(
|
|||
&Argument); /* Argument */
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
RtlInitUnicodeString(&usLabel, Label);
|
||||
|
||||
DPRINT1("FormatEx - %S\n", Format);
|
||||
DPRINT("FormatEx - %S\n", Format);
|
||||
Provider->FormatEx(
|
||||
&usDriveRoot,
|
||||
MediaFlag,
|
||||
|
|
Loading…
Reference in a new issue