mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[FORMAT] Handle unformatted volumes
This commit is contained in:
parent
c5a9f22d4e
commit
358fecdcf0
1 changed files with 11 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue