mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[dev] fix description of UAS devices
* Having Windows append "SCSI Disk Device" screws up the scoring regarding disks that are actually describing themselves as SCSI, so replace that with "UAS Device", as it should be. * Closes #2221. * Also fix a MinGW warning.
This commit is contained in:
parent
a6451c6fc7
commit
1a3a155e8c
3 changed files with 27 additions and 14 deletions
10
src/dev.c
10
src/dev.c
|
@ -778,6 +778,16 @@ BOOL GetDevices(DWORD devnum)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Windows has the bad habit of appending "SCSI Disk Device" to the description
|
||||||
|
// of UAS devices, which of course screws up detection of device that actually
|
||||||
|
// describe themselves as SCSI-like disks, so replace that with "UAS Device".
|
||||||
|
if (props.is_UASP) {
|
||||||
|
const char scsi_disk_device_str[] = "SCSI Disk Device";
|
||||||
|
const char uas_device_str[] = "UAS Device";
|
||||||
|
char* marker = strstr(buffer, scsi_disk_device_str);
|
||||||
|
if (marker != NULL && marker[sizeof(scsi_disk_device_str)] == 0)
|
||||||
|
memcpy(marker, uas_device_str, sizeof(uas_device_str));
|
||||||
|
}
|
||||||
if (props.is_VHD) {
|
if (props.is_VHD) {
|
||||||
uprintf("Found VHD device '%s'", buffer);
|
uprintf("Found VHD device '%s'", buffer);
|
||||||
} else if ((props.is_CARD) && ((!props.is_USB) || ((props.vid == 0) && (props.pid == 0)))) {
|
} else if ((props.is_CARD) && ((!props.is_USB) || ((props.vid == 0) && (props.pid == 0)))) {
|
||||||
|
|
|
@ -3328,7 +3328,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
FILE* fd;
|
FILE* fd;
|
||||||
BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount = TRUE;
|
BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount = TRUE;
|
||||||
BOOL disable_hogger = FALSE, previous_enable_HDDs = FALSE, vc = IsRegistryNode(REGKEY_HKCU, vs_reg);
|
BOOL disable_hogger = FALSE, previous_enable_HDDs = FALSE, vc = IsRegistryNode(REGKEY_HKCU, vs_reg);
|
||||||
BOOL alt_pressed = FALSE, alt_command = FALSE, is_WOW64 = FALSE;
|
BOOL alt_pressed = FALSE, alt_command = FALSE;
|
||||||
BYTE *loc_data;
|
BYTE *loc_data;
|
||||||
DWORD loc_size, u = 0, size = sizeof(u);
|
DWORD loc_size, u = 0, size = sizeof(u);
|
||||||
char tmp_path[MAX_PATH] = "", loc_file[MAX_PATH] = "", ini_path[MAX_PATH] = "", ini_flags[] = "rb";
|
char tmp_path[MAX_PATH] = "", loc_file[MAX_PATH] = "", ini_path[MAX_PATH] = "", ini_flags[] = "rb";
|
||||||
|
@ -3414,6 +3414,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
static_strcpy(sysnative_dir, system_dir);
|
static_strcpy(sysnative_dir, system_dir);
|
||||||
// But if the app is 32 bit and the OS is 64 bit, Sysnative must differ from System32
|
// But if the app is 32 bit and the OS is 64 bit, Sysnative must differ from System32
|
||||||
#if (!defined(_WIN64) && !defined(BUILD64))
|
#if (!defined(_WIN64) && !defined(BUILD64))
|
||||||
|
{
|
||||||
|
BOOL is_WOW64 = FALSE;
|
||||||
IsWow64Process(GetCurrentProcess(), &is_WOW64);
|
IsWow64Process(GetCurrentProcess(), &is_WOW64);
|
||||||
if (is_WOW64) {
|
if (is_WOW64) {
|
||||||
if (GetSystemWindowsDirectoryU(sysnative_dir, sizeof(sysnative_dir)) == 0) {
|
if (GetSystemWindowsDirectoryU(sysnative_dir, sizeof(sysnative_dir)) == 0) {
|
||||||
|
@ -3422,6 +3424,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
}
|
}
|
||||||
static_strcat(sysnative_dir, "\\Sysnative");
|
static_strcat(sysnative_dir, "\\Sysnative");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Look for a rufus.app file in the current app directory
|
// Look for a rufus.app file in the current app directory
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||||
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 3.23.2024"
|
CAPTION "Rufus 3.23.2025"
|
||||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||||
|
@ -392,8 +392,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,23,2024,0
|
FILEVERSION 3,23,2025,0
|
||||||
PRODUCTVERSION 3,23,2024,0
|
PRODUCTVERSION 3,23,2025,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -411,13 +411,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://rufus.ie"
|
VALUE "Comments", "https://rufus.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "3.23.2024"
|
VALUE "FileVersion", "3.23.2025"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||||
VALUE "OriginalFilename", "rufus-3.23.exe"
|
VALUE "OriginalFilename", "rufus-3.23.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.23.2024"
|
VALUE "ProductVersion", "3.23.2025"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue