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

[core] add support for additional VHD drivers

* Closes #407
This commit is contained in:
Pete Batard 2014-11-27 23:36:28 +00:00
parent 5863db3ef3
commit 79ea0b2b94
2 changed files with 27 additions and 11 deletions

View file

@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 1.5.0.549"
CAPTION "Rufus 1.5.0.550"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,291,50,14
@ -164,7 +164,7 @@ END
IDD_DIALOG_XP DIALOGEX 12, 12, 242, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 1.5.0.549"
CAPTION "Rufus 1.5.0.550"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,291,50,14
@ -297,7 +297,7 @@ END
IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 1.5.0.549"
CAPTION "Rufus 1.5.0.550"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,291,50,14
@ -437,7 +437,7 @@ END
IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 1.5.0.549"
CAPTION "Rufus 1.5.0.550"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,291,50,14
@ -702,8 +702,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,5,0,549
PRODUCTVERSION 1,5,0,549
FILEVERSION 1,5,0,550
PRODUCTVERSION 1,5,0,550
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -720,13 +720,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.5.0.549"
VALUE "FileVersion", "1.5.0.550"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.5.0.549"
VALUE "ProductVersion", "1.5.0.550"
END
END
BLOCK "VarFileInfo"

View file

@ -104,6 +104,24 @@ out:
safe_closehandle(handle);
}
static __inline BOOL IsVHD(const char* buffer)
{
int i;
// List of the Friendly Names of the VHD devices we know
const char* vhd_name[] = {
"Arsenal Virtual SCSI Disk Device",
"Kernsafe Virtual SCSI Disk Device",
"Microsoft Virtual Disk",
"MS Virtual Server SCSI Disk Device",
"Msft Virtual Disk"
};
for (i = 0; i < ARRAYSIZE(vhd_name); i++)
if (safe_stricmp(buffer, vhd_name[i]) == 0)
return TRUE;
return FALSE;
}
/*
* Refresh the list of USB devices
*/
@ -113,8 +131,6 @@ BOOL GetUSBDevices(DWORD devnum)
// 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* scsi_name = "SCSI";
const char* win8_vhd_name = "Microsoft Virtual Disk";
const char* win7_vhd_name = "Msft Virtual Disk";
const char* usb_speed_name[USB_SPEED_MAX] = { "USB", "USB 1.0", "USB 1.1", "USB 2.0", "USB 3.0" };
// Hash table and String Array used to match a Device ID with the parent hub's Device Interface Path
htab_table htab_devid = HTAB_EMPTY;
@ -249,7 +265,7 @@ BOOL GetUSBDevices(DWORD devnum)
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)"
safe_strcpy(buffer, sizeof(buffer), lmprintf(MSG_045));
} else if ((safe_strstr(buffer, win7_vhd_name) != NULL) || (safe_strstr(buffer, win8_vhd_name) != NULL)) {
} else if (IsVHD(buffer)) {
props.is_VHD = TRUE;
} else if (devid_list != NULL) {
// Get the properties of the device. We could avoid doing this lookup every time by keeping