aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-04-21 14:01:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-27 15:16:28 +0100
commit92b58e1c789ee412d936285144e8e549c99ff979 (patch)
treece63e90f8f8192403b0ac53ed48390c1c4855bd5
parentcf4a18eec2a65d840352d1a2862242d116e8a409 (diff)
downloadopenembedded-core-contrib-92b58e1c789ee412d936285144e8e549c99ff979.tar.gz
openembedded-core-contrib-92b58e1c789ee412d936285144e8e549c99ff979.tar.bz2
openembedded-core-contrib-92b58e1c789ee412d936285144e8e549c99ff979.zip
mkefidisk.sh: be more explicit with device error
* Specify whether the device can't be found or can't be written to * Give a hint to use sudo Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/contrib/mkefidisk.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index d6bc965137f..55f72b0f542 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -173,7 +173,11 @@ fi
if [ ! -w "$DEVICE" ]; then
usage
- die "Device $DEVICE does not exist or is not writable"
+ if [ ! -e "${DEVICE}" ] ; then
+ die "Device $DEVICE cannot be found"
+ else
+ die "Device $DEVICE is not writable (need to run under sudo?)"
+ fi
fi
if [ ! -e "$HDDIMG" ]; then