1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

Upstream merge

This commit is contained in:
Scott 2014-03-30 00:49:09 +11:00
parent 0e18200080
commit e1b65ad81b

View file

@ -633,7 +633,7 @@ static BOOL GetUSBDevices(DWORD devnum)
// The rest are the vendor UASP drivers I know of so far - list may be incomplete! // The rest are the vendor UASP drivers I know of so far - list may be incomplete!
const char* storage_name[] = { "USBSTOR", "UASPSTOR", "VUSBSTOR", "ETRONSTOR" }; const char* storage_name[] = { "USBSTOR", "UASPSTOR", "VUSBSTOR", "ETRONSTOR" };
const char* scsi_name = "SCSI"; const char* scsi_name = "SCSI";
const char* vhd_name[] = { "Microsoft Virtual Disk", "Msft Virtual Disk SCSI Disk Device" }; const char* vhd_name = "Microsoft Virtual Disk";
char letter_name[] = " (?:)"; char letter_name[] = " (?:)";
BOOL found = FALSE, is_SCSI, is_UASP, is_VHD; BOOL found = FALSE, is_SCSI, is_UASP, is_VHD;
HDEVINFO dev_info = NULL; HDEVINFO dev_info = NULL;
@ -713,13 +713,9 @@ static BOOL GetUSBDevices(DWORD devnum)
uprintf("SetupDiGetDeviceRegistryProperty (Friendly Name) failed: %s\n", WindowsErrorString()); uprintf("SetupDiGetDeviceRegistryProperty (Friendly Name) failed: %s\n", WindowsErrorString());
// We can afford a failure on this call - just replace the name with "USB Storage Device (Generic)" // We can afford a failure on this call - just replace the name with "USB Storage Device (Generic)"
safe_strcpy(buffer, sizeof(buffer), lmprintf(MSG_045)); safe_strcpy(buffer, sizeof(buffer), lmprintf(MSG_045));
} else { } else if (safe_stricmp(buffer, vhd_name) == 0) {
for (j = 0; j < ARRAYSIZE(vhd_name); j++) {
if (safe_stricmp(buffer, vhd_name[j]) == 0) {
is_VHD = TRUE; is_VHD = TRUE;
} } else {
}
if (is_VHD == FALSE) {
// Get the VID:PID of the device. We could avoid doing this lookup every time by keeping // Get the VID:PID of the device. We could avoid doing this lookup every time by keeping
// a lookup table, but there shouldn't be that many USB storage devices connected... // a lookup table, but there shouldn't be that many USB storage devices connected...
for (devid = devid_list; *devid; devid += strlen(devid) + 1) { for (devid = devid_list; *devid; devid += strlen(devid) + 1) {
@ -744,7 +740,6 @@ static BOOL GetUSBDevices(DWORD devnum)
} }
} }
} }
}
if (is_VHD) { if (is_VHD) {
uprintf("Found VHD device '%s'\n", buffer); uprintf("Found VHD device '%s'\n", buffer);
} else { } else {