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 <jh80.chung@samsung.com>
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