From fff39c56e85d63096e7a7518433165955210879c Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 17 Jan 2024 14:10:46 +0000 Subject: [PATCH] [misc] fix UEFI:NTFS partition not being added when needed in MBR mode * Also add support for SD card readers identifying themselves as SDXC. --- src/dev.c | 2 +- src/format.c | 5 +++-- src/iso.c | 2 +- src/rufus.rc | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/dev.c b/src/dev.c index d70631cb..998afb90 100644 --- a/src/dev.c +++ b/src/dev.c @@ -465,7 +465,7 @@ BOOL GetDevices(DWORD devnum) // Oh, and we also have card devices (e.g. 'SCSI\DiskO2Micro_SD_...') under the SCSI enumerator... const char* scsi_disk_prefix = "SCSI\\Disk"; const char* scsi_card_name[] = { - "_SD_", "_SDHC_", "_MMC_", "_MS_", "_MSPro_", "_xDPicture_", "_O2Media_" + "_SD_", "_SDHC_", "_SDXC_", "_MMC_", "_MS_", "_MSPro_", "_xDPicture_", "_O2Media_" }; const char* usb_speed_name[USB_SPEED_MAX] = { "USB", "USB 1.0", "USB 1.1", "USB 2.0", "USB 3.0", "USB 3.1" }; const char* windows_sandbox_vhd_label = "PortableBaseLayer"; diff --git a/src/format.c b/src/format.c index b9017a37..16a5313d 100644 --- a/src/format.c +++ b/src/format.c @@ -1,7 +1,7 @@ /* * Rufus: The Reliable USB Formatting Utility * Formatting function calls - * Copyright © 2011-2023 Pete Batard + * Copyright © 2011-2024 Pete Batard * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1463,7 +1463,8 @@ DWORD WINAPI FormatThread(void* param) extra_partitions = XP_ESP | XP_MSR; else if ( ((fs_type == FS_NTFS) || (fs_type == FS_EXFAT)) && ((boot_type == BT_UEFI_NTFS) || ((boot_type == BT_IMAGE) && IS_EFI_BOOTABLE(img_report) && - ((target_type == TT_UEFI) || (windows_to_go) || (allow_dual_uefi_bios) || (img_report.has_4GB_file)))) ) + ((target_type == TT_UEFI) || (windows_to_go) || (allow_dual_uefi_bios) || + (img_report.has_4GB_file) || (img_report.needs_ntfs)))) ) extra_partitions = XP_UEFI_NTFS; else if ((boot_type == BT_IMAGE) && !write_as_image && HAS_PERSISTENCE(img_report) && persistence_size) extra_partitions = XP_CASPER; diff --git a/src/iso.c b/src/iso.c index 0ddda128..e03dd9b1 100644 --- a/src/iso.c +++ b/src/iso.c @@ -298,7 +298,7 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t file_length, const // https://salsa.debian.org/live-team/live-build/-/commit/5bff71fea2dd54adcd6c428d3f1981734079a2f7 // Because of this, if we detect a small bootx64.efi file, we assert that it's a // broken link and try to extract a "good" version from the El-Torito image. - if ((safe_stricmp(psz_basename, efi_bootname[2]) == 0) && (file_length < 100)) { + if ((safe_stricmp(psz_basename, efi_bootname[2]) == 0) && (file_length < 256)) { img_report.has_efi |= 0x4000; static_strcpy(img_report.efi_img_path, "[BOOT]/1-Boot-NoEmul.img"); } diff --git a/src/rufus.rc b/src/rufus.rc index 5484cbb6..e117105e 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -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 4.4.2101" +CAPTION "Rufus 4.4.2102" 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 4,4,2101,0 - PRODUCTVERSION 4,4,2101,0 + FILEVERSION 4,4,2102,0 + PRODUCTVERSION 4,4,2102,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", "4.4.2101" + VALUE "FileVersion", "4.4.2102" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2024 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-4.4.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "4.4.2101" + VALUE "ProductVersion", "4.4.2102" END END BLOCK "VarFileInfo"