Fix the use of resize2fs
authorJunghoon Kim <jhoon20.kim@samsung.com>
Tue, 21 Apr 2020 07:59:05 +0000 (16:59 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Nov 2021 10:19:26 +0000 (11:19 +0100)
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 () {