From: Seung-Woo Kim Date: Fri, 2 Apr 2021 02:28:48 +0000 (+0900) Subject: scripts: tizen: sd_fusing: umount block part only when mounted X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d2c0736adeb3faab15490e37df852d918950a56;p=platform%2Fkernel%2Fu-boot.git scripts: tizen: sd_fusing: umount block part only when mounted The umount command is used without checking the block part is really mounted. Umount part only when mounted. The series for cleaning up fusing script is done, so bump up minor version instead of sub version. Change-Id: Ic665936838be4529973d63c6123db9a2c7acc7d7 Signed-off-by: Seung-Woo Kim --- diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index 1116b9b664..b1d28df0be 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -92,7 +92,12 @@ function fusing_image () { local -r input_size_mb=`expr $input_size / 1024 / 1024` print_message 2 "[Fusing $1 ($input_size_mb MiB)]" - umount $device + if [ "$blktype" == "part" ]; then + local MOUNT_PART=`mount | grep $device` + if [ "$MOUNT_PART" != "" ]; then + umount $device + fi + fi if [ $OLD_DD == 1 ]; then dd if=$fusing_img | pv -s $input_size | dd of=$device bs=$bs else @@ -370,7 +375,7 @@ function check_device () { function print_logo () { echo "" - echo "Raspberry Pi downloader, version 2.0.7" + echo "Raspberry Pi downloader, version 2.1.0" echo "" }