From cb63eb4182705ab10ae3e264ed2bbeb5d2da1238 Mon Sep 17 00:00:00 2001 From: Charles Stevens Date: Tue, 23 Oct 2018 14:10:52 -0500 Subject: [PATCH] Add command line handling of preferred file system. --- src/rufus.c | 68 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/src/rufus.c b/src/rufus.c index 355942b3..ac5b07d5 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -114,6 +114,7 @@ char embedded_sl_version_str[2][12] = { "?.??", "?.??" }; char embedded_sl_version_ext[2][32]; char ClusterSizeLabel[MAX_CLUSTER_SIZES][64]; char msgbox[1024], msgbox_title[32], *ini_file = NULL, *image_path = NULL, *short_image_path; +int cmdln_preferred_fs = FS_UNKNOWN; char image_option_txt[128]; StrArray DriveID, DriveLabel, DriveHub, BlockingProcess, ImageList; // Number of steps for each FS for FCC_STRUCTURE_PROGRESS @@ -564,17 +565,30 @@ static void SetFSFromISO(void) if (fs_mask & (1 << FS_NTFS)) { preferred_fs = FS_NTFS; } - // Syslinux and EFI have precedence over bootmgr (unless the user selected BIOS as target type) - } else if ((HAS_SYSLINUX(img_report)) || (HAS_REACTOS(img_report)) || HAS_KOLIBRIOS(img_report) || - (IS_EFI_BOOTABLE(img_report) && (tt == TT_UEFI) && (!windows_to_go))) { - if (fs_mask & (1< FS_UNKNOWN) && (tmp_fs < FS_MAX)) { + cmdln_preferred_fs = tmp_fs; + } + } + break; case 'w': wait_for_mutex = atoi(optarg); break;