mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[usb] fix processing of sibling device instances
* Issue introduced in f88faf1a4f
* Closes #696
This commit is contained in:
parent
c3f47ada06
commit
64828934e0
2 changed files with 8 additions and 9 deletions
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 2.8.861"
|
CAPTION "Rufus 2.8.862"
|
||||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||||
|
@ -320,8 +320,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,8,861,0
|
FILEVERSION 2,8,862,0
|
||||||
PRODUCTVERSION 2,8,861,0
|
PRODUCTVERSION 2,8,862,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -338,13 +338,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "2.8.861"
|
VALUE "FileVersion", "2.8.862"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus.exe"
|
VALUE "OriginalFilename", "rufus.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "2.8.861"
|
VALUE "ProductVersion", "2.8.862"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -194,7 +194,7 @@ BOOL GetUSBDevices(DWORD devnum)
|
||||||
SP_DEVINFO_DATA dev_info_data;
|
SP_DEVINFO_DATA dev_info_data;
|
||||||
SP_DEVICE_INTERFACE_DATA devint_data;
|
SP_DEVICE_INTERFACE_DATA devint_data;
|
||||||
PSP_DEVICE_INTERFACE_DETAIL_DATA_A devint_detail_data;
|
PSP_DEVICE_INTERFACE_DETAIL_DATA_A devint_detail_data;
|
||||||
DEVINST parent_inst, grandparent_inst, sibling_inst, device_inst;
|
DEVINST parent_inst, grandparent_inst, device_inst;
|
||||||
DWORD size, i, j, k, l, datatype, drive_index;
|
DWORD size, i, j, k, l, datatype, drive_index;
|
||||||
DWORD uasp_start = ARRAYSIZE(usbstor_name), card_start = ARRAYSIZE(genstor_name);
|
DWORD uasp_start = ARRAYSIZE(usbstor_name), card_start = ARRAYSIZE(genstor_name);
|
||||||
ULONG list_size[ARRAYSIZE(usbstor_name)] = { 0 }, list_start[ARRAYSIZE(usbstor_name)] = { 0 }, full_list_size, ulFlags;
|
ULONG list_size[ARRAYSIZE(usbstor_name)] = { 0 }, list_start[ARRAYSIZE(usbstor_name)] = { 0 }, full_list_size, ulFlags;
|
||||||
|
@ -396,10 +396,9 @@ BOOL GetUSBDevices(DWORD devnum)
|
||||||
}
|
}
|
||||||
if (device_inst != dev_info_data.DevInst) {
|
if (device_inst != dev_info_data.DevInst) {
|
||||||
// Try the siblings
|
// Try the siblings
|
||||||
while (CM_Get_Sibling(&sibling_inst, device_inst, 0) == CR_SUCCESS) {
|
while (CM_Get_Sibling(&device_inst, device_inst, 0) == CR_SUCCESS) {
|
||||||
if (sibling_inst == dev_info_data.DevInst) {
|
if (device_inst == dev_info_data.DevInst) {
|
||||||
uuprintf("NOTE: Matched instance from sibling for '%s'", device_id);
|
uuprintf("NOTE: Matched instance from sibling for '%s'", device_id);
|
||||||
device_inst = sibling_inst;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue