1
1
Fork 0
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:
Pete Batard 2023-04-19 13:38:19 +01:00
parent a6451c6fc7
commit 1a3a155e8c
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 27 additions and 14 deletions

View file

@ -778,6 +778,16 @@ BOOL GetDevices(DWORD devnum)
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) {
uprintf("Found VHD device '%s'", buffer);
} else if ((props.is_CARD) && ((!props.is_USB) || ((props.vid == 0) && (props.pid == 0)))) {

View file

@ -3328,7 +3328,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
FILE* fd;
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 alt_pressed = FALSE, alt_command = FALSE, is_WOW64 = FALSE;
BOOL alt_pressed = FALSE, alt_command = FALSE;
BYTE *loc_data;
DWORD loc_size, u = 0, size = sizeof(u);
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);
// But if the app is 32 bit and the OS is 64 bit, Sysnative must differ from System32
#if (!defined(_WIN64) && !defined(BUILD64))
{
BOOL is_WOW64 = FALSE;
IsWow64Process(GetCurrentProcess(), &is_WOW64);
if (is_WOW64) {
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");
}
}
#endif
// Look for a rufus.app file in the current app directory

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.23.2024"
CAPTION "Rufus 3.23.2025"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -392,8 +392,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,23,2024,0
PRODUCTVERSION 3,23,2024,0
FILEVERSION 3,23,2025,0
PRODUCTVERSION 3,23,2025,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -411,13 +411,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.23.2024"
VALUE "FileVersion", "3.23.2025"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.23.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.23.2024"
VALUE "ProductVersion", "3.23.2025"
END
END
BLOCK "VarFileInfo"