mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-19 09:25:12 -04:00
[core] add HDD vs UFD detection
* Initial scoring to try to differentiate UFDs from HDDs (#219) * Also improve GetDriveLetter() and add a global for fixed vs removable * Also fix a bug with reporting of VID:PID with multiple devices * Also fix a warning in localization
This commit is contained in:
parent
803a4bff1c
commit
aa0bf0ee2b
7 changed files with 165 additions and 38 deletions
|
@ -1195,7 +1195,11 @@ DWORD WINAPI FormatThread(LPVOID param)
|
|||
}
|
||||
|
||||
// At this stage with have both a handle and a lock to the physical drive...
|
||||
drive_name[0] = GetDriveLetter(DriveIndex);
|
||||
if (!GetDriveLetter(DriveIndex, &drive_name[0])) {
|
||||
uprintf("Failed to get a drive letter\n");
|
||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_ASSIGN_LETTER);
|
||||
goto out;
|
||||
}
|
||||
if (drive_name[0] == ' ') {
|
||||
uprintf("No drive letter was assigned...\n");
|
||||
drive_name[0] = GetUnusedDriveLetter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue