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 more non-USB card readers

* Closes #994
This commit is contained in:
Pete Batard 2017-08-11 11:43:37 +01:00
parent 90dc847e24
commit 3a150ddeda
2 changed files with 15 additions and 6 deletions

View file

@ -305,6 +305,7 @@ BOOL GetDevices(DWORD devnum)
char letter_name[] = " (?:)"; char letter_name[] = " (?:)";
char drive_name[] = "?:\\"; char drive_name[] = "?:\\";
char uefi_togo_check[] = "?:\\EFI\\Rufus\\ntfs_x64.efi"; char uefi_togo_check[] = "?:\\EFI\\Rufus\\ntfs_x64.efi";
char scsi_card_name_copy[16];
BOOL r = FALSE, found = FALSE, post_backslash; BOOL r = FALSE, found = FALSE, post_backslash;
HDEVINFO dev_info = NULL; HDEVINFO dev_info = NULL;
SP_DEVINFO_DATA dev_info_data; SP_DEVINFO_DATA dev_info_data;
@ -490,7 +491,15 @@ BOOL GetDevices(DWORD devnum)
// Additional detection for SCSI card readers // Additional detection for SCSI card readers
if ((!props.is_CARD) && (safe_strnicmp(buffer, scsi_disk_prefix, sizeof(scsi_disk_prefix)-1) == 0)) { if ((!props.is_CARD) && (safe_strnicmp(buffer, scsi_disk_prefix, sizeof(scsi_disk_prefix)-1) == 0)) {
for (j = 0; j < ARRAYSIZE(scsi_card_name); j++) { for (j = 0; j < ARRAYSIZE(scsi_card_name); j++) {
if (safe_strstr(buffer, scsi_card_name[j]) != NULL) { static_strcpy(scsi_card_name_copy, scsi_card_name[j]);
if (safe_strstr(buffer, scsi_card_name_copy) != NULL) {
props.is_CARD = TRUE;
break;
}
// Also test for "_SD&" instead of "_SD_" and so on to allow for devices like
// "SCSI\DiskRicoh_Storage_SD&REV_3.0" to be detected.
scsi_card_name_copy[strlen(scsi_card_name_copy) - 1] = '&';
if (safe_strstr(buffer, scsi_card_name_copy) != NULL) {
props.is_CARD = TRUE; props.is_CARD = TRUE;
break; break;
} }

View file

@ -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.17.1175" CAPTION "Rufus 2.17.1176"
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
@ -366,8 +366,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,17,1175,0 FILEVERSION 2,17,1176,0
PRODUCTVERSION 2,17,1175,0 PRODUCTVERSION 2,17,1176,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -384,13 +384,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.17.1175" VALUE "FileVersion", "2.17.1176"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2017 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.17.1175" VALUE "ProductVersion", "2.17.1176"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"