mirror of
https://github.com/reactos/reactos.git
synced 2026-05-24 00:00:41 +08:00
[FORMAT] Handle unformatted volumes
This commit is contained in:
committed by
Hermès BÉLUSCA - MAÏTO
parent
c5a9f22d4e
commit
358fecdcf0
@@ -364,7 +364,7 @@ int wmain(int argc, WCHAR *argv[])
|
||||
FMIFS_MEDIA_FLAG media = FMIFS_HARDDISK;
|
||||
DWORD driveType;
|
||||
WCHAR fileSystem[1024];
|
||||
WCHAR volumeName[1024];
|
||||
WCHAR volumeName[1024] = {0};
|
||||
WCHAR input[1024];
|
||||
DWORD serialNumber;
|
||||
DWORD flags, maxComponent;
|
||||
@@ -475,9 +475,16 @@ int wmain(int argc, WCHAR *argv[])
|
||||
&serialNumber, &maxComponent, &flags,
|
||||
fileSystem, ARRAYSIZE(fileSystem)))
|
||||
{
|
||||
K32LoadStringW(GetModuleHandle(NULL), STRING_NO_VOLUME, szMsg, ARRAYSIZE(szMsg));
|
||||
PrintWin32Error(szMsg, GetLastError());
|
||||
return -1;
|
||||
if (GetLastError() == ERROR_UNRECOGNIZED_VOLUME)
|
||||
{
|
||||
wcscpy(fileSystem, L"RAW");
|
||||
}
|
||||
else
|
||||
{
|
||||
K32LoadStringW(GetModuleHandle(NULL), STRING_NO_VOLUME, szMsg, ARRAYSIZE(szMsg));
|
||||
PrintWin32Error(szMsg, GetLastError());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (QueryDeviceInformation(RootDirectory,
|
||||
|
||||
Reference in New Issue
Block a user