From 6fb1ee15072e232544d907e93863f6cb2a6b8349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Tue, 8 May 2018 07:34:15 +0800 Subject: [PATCH] mount_target_filesystem: Support NTFS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ๆž—ๅšไป(Buo-ren Lin) --- src/woeusb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/woeusb b/src/woeusb index ecaccfb..f6d7361 100755 --- a/src/woeusb +++ b/src/woeusb @@ -281,8 +281,8 @@ init(){ if ! mount_target_filesystem\ "${target_partition}"\ - "${target_fs_mountpoint}"\ - vfat; then + "${target_fs_mountpoint}" + "${target_filesystem_type}"; then echo_with_color red 'Error: Unable to mount target filesystem' exit 1 fi @@ -1223,7 +1223,7 @@ mount_source_filesystem(){ # Mount target filesystem to existing path as mountpoint # target_partition: The partition device file target filesystem resides, for example /dev/sdX1 # target_fs_mountpoint: The existing directory used as the target filesystem's mountpoint, for example /mnt/target_filesystem -# target_fs_type: The filesystem of the target filesystem, this is same as the --types argument of mount(8), currently supports: vfat +# target_fs_type: The filesystem of the target filesystem currently supports: FAT, NTFS mount_target_filesystem(){ util_check_function_parameters_quantity 3 $# local target_partition="$1"; shift @@ -1244,9 +1244,12 @@ mount_target_filesystem(){ # Determine proper mount options according to filesystem type case "${target_fs_type}" in - vfat) + FAT) mount_options='utf8=1' ;; + NTFS) + : + ;; *) printf_with_color\ red\