Skip to content

Commit

Permalink
[misc] fix UEFI:NTFS partition not being added when needed in MBR mode
Browse files Browse the repository at this point in the history
* Also add support for SD card readers identifying themselves as SDXC.
  • Loading branch information
pbatard committed Jan 17, 2024
1 parent 710bfe7 commit fff39c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
5 changes: 3 additions & 2 deletions src/format.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Formatting function calls
* Copyright © 2011-2023 Pete Batard <[email protected]>
* Copyright © 2011-2024 Pete Batard <[email protected]>
*
* 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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
10 changes: 5 additions & 5 deletions src/rufus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit fff39c5

Please sign in to comment.