From 1af39a5d6e5f80381aa0273f35666474f779ab31 Mon Sep 17 00:00:00 2001 From: Junghoon Kim Date: Tue, 21 Apr 2020 16:59:05 +0900 Subject: [PATCH] Fix the use of resize2fs The resize2fs can be used to enlarge or shrink the ext family filesystem only. Thus, An error occurs when trying to use it with other filesystems such as vfat. Fix the use of resize2fs for use only with the ext family filesystem. Change-Id: I2c9b7c686086d924b003d07a2762bb668dd39ac8 Signed-off-by: Junghoon Kim --- scripts/tizen/sd_fusing_rpi3.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index 406bae6..e1f61a5 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -70,7 +70,11 @@ function fusing_image () { print_message 2 "[Fusing $1]" umount $device dd if=$fusing_img | pv -s $input_size | dd of=$device bs=$bs - resize2fs -f $device + + local -r fstype=`blkid -o value -s TYPE $device` + if [[ "$fstype" =~ "ext" ]]; then + resize2fs -f $device + fi } function fuse_image_tarball () { -- 2.7.4