Fix the use of resize2fs
authorJunghoon Kim <jhoon20.kim@samsung.com>
Tue, 21 Apr 2020 07:59:05 +0000 (16:59 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 17 Oct 2023 04:19:20 +0000 (13:19 +0900)
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 <jhoon20.kim@samsung.com>
scripts/tizen/sd_fusing_rpi3.sh

index 406bae6..e1f61a5 100755 (executable)
@@ -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 () {