Add a hack to enable formatting (was broken since at least r20156)

svn path=/trunk/; revision=23919
This commit is contained in:
Hervé Poussineau 2006-09-04 21:58:38 +00:00
parent 478f24b02b
commit aa34958d1b

View file

@ -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,