Skip to content

Commit

Permalink
[iso] improve fallback for dual UDF+ISO9660 images
Browse files Browse the repository at this point in the history
* Also add private filtering of LM90X USB⟷SSD devices
  • Loading branch information
pbatard committed Aug 28, 2019
1 parent 94b2839 commit 7980292
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

extern StrArray DriveId, DriveName, DriveLabel, DriveHub;
extern uint32_t DrivePort[MAX_DRIVES];
extern BOOL enable_HDDs, use_fake_units, enable_vmdk, usb_debug, list_non_usb_removable_drives;
extern BOOL enable_HDDs, use_fake_units, enable_vmdk, usb_debug, list_non_usb_removable_drives, is_me;

/*
* Get the VID, PID and current device speed
Expand Down Expand Up @@ -781,6 +781,9 @@ BOOL GetDevices(DWORD devnum)
}
static_strcpy(str, "????:????"); // Couldn't figure VID:PID
} else {
// because I don't want to end up erasing this specific device of mine by accident
if (is_me && (props.vid == 0x0525) && (props.pid == 0x622b))
continue;
static_sprintf(str, "%04X:%04X", props.vid, props.pid);
}
if (props.speed >= USB_SPEED_MAX)
Expand Down
2 changes: 1 addition & 1 deletion src/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan)
p_udf_root = udf_get_root(p_udf, true, 0);
if (p_udf_root == NULL) {
uprintf("%sCould not locate UDF root directory", spacing);
goto out;
goto try_iso;
}
if (scan_only) {
if (udf_get_logical_volume_id(p_udf, img_report.label, sizeof(img_report.label)) <= 0)
Expand Down
5 changes: 3 additions & 2 deletions src/rufus.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ HWND hDeviceList, hPartitionScheme, hTargetSystem, hFileSystem, hClusterSize, hL
HWND hLogDialog = NULL, hProgress = NULL, hDiskID;
HANDLE dialog_handle = NULL;
BOOL is_x86_32, use_own_c32[NB_OLD_C32] = { FALSE, FALSE }, mbr_selected_by_user = FALSE;
BOOL op_in_progress = TRUE, right_to_left_mode = FALSE, has_uefi_csm;
BOOL op_in_progress = TRUE, right_to_left_mode = FALSE, has_uefi_csm = FALSE, is_me = FALSE;
BOOL enable_HDDs = FALSE, enable_ntfs_compression = FALSE, no_confirmation_on_cancel = FALSE, lock_drive = TRUE;
BOOL advanced_mode_device, advanced_mode_format, allow_dual_uefi_bios, detect_fakes, enable_vmdk, force_large_fat32, usb_debug;
BOOL use_fake_units, preserve_timestamps = FALSE, fast_zeroing = FALSE, app_changed_size = FALSE;
Expand Down Expand Up @@ -2876,7 +2876,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
BOOL disable_hogger = FALSE, previous_enable_HDDs = FALSE, vc = IsRegistryNode(REGKEY_HKCU, vs_reg);
BOOL alt_pressed = FALSE, alt_command = FALSE;
BYTE *loc_data;
DWORD loc_size, size;
DWORD loc_size, u, size = sizeof(u);
char tmp_path[MAX_PATH] = "", loc_file[MAX_PATH] = "", ini_path[MAX_PATH] = "", ini_flags[] = "rb";
char *tmp, *locale_name = NULL, **argv = NULL;
wchar_t **wenv, **wargv;
Expand Down Expand Up @@ -2924,6 +2924,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
pfSetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);

uprintf("*** " APPLICATION_NAME " init ***\n");
is_me = GetUserNameA((char*)(uintptr_t)& u, &size) && (u == 7104878);
// coverity[pointless_string_compare]
is_x86_32 = (strcmp(APPLICATION_ARCH, "x86") == 0);

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 3.7.1570"
CAPTION "Rufus 3.7.1571"
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 @@ -394,8 +394,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,7,1570,0
PRODUCTVERSION 3,7,1570,0
FILEVERSION 3,7,1571,0
PRODUCTVERSION 3,7,1571,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -413,13 +413,13 @@ BEGIN
VALUE "Comments", "https://akeo.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.7.1570"
VALUE "FileVersion", "3.7.1571"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "� 2011-2019 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus-3.7.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.7.1570"
VALUE "ProductVersion", "3.7.1571"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 7980292

Please sign in to comment.