From aa34958d1bca6c7b07017b8639e3c9b8b5a7f133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 4 Sep 2006 21:58:38 +0000 Subject: [PATCH] Add a hack to enable formatting (was broken since at least r20156) svn path=/trunk/; revision=23919 --- reactos/dll/win32/fmifs/format.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/fmifs/format.c b/reactos/dll/win32/fmifs/format.c index bef9f0ab85d..0cc7a161c27 100644 --- a/reactos/dll/win32/fmifs/format.c +++ b/reactos/dll/win32/fmifs/format.c @@ -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,