From: Jaehoon Chung Date: Tue, 19 Mar 2019 06:47:06 +0000 (+0900) Subject: scripts: sd_fusing_rpi3: check whether block device is valid or not X-Git-Tag: submit/tizen/20190409.022711~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c8ff1849bc05b3a6e5ae58b3a762f14b5f38ed9;p=platform%2Fkernel%2Fu-boot.git scripts: sd_fusing_rpi3: check whether block device is valid or not Check whether block devic is valid or not. If try to update the image without block device, it will make just device image. e.g)sudo ./sd_fusing_rpi3.sh -d /dev/sdf -b kernel.tar - then it's maken kernel image as /dev/sdf. it's not real block device. Change-Id: Ie6dc12a7f0d95204d698194b5356ce376fa43973 Signed-off-by: Jaehoon Chung --- diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index 2f262bf4c7..d0e4582e07 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -267,7 +267,14 @@ function check_args () { fi if [ "$DEVICE" != "" ]; then - echo "Device: $DEVICE" + if [ -b "$DEVICE" ]; then + echo "Device: $DEVICE" + else + echo "Device not found : $DEVICE" + show_usage + tput sgr 0 + exit 0 + fi fi if [ "$FUSING_BINARY_NUM" != 0 ]; then