summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorTeresa Gamez <T.Gamez@phytec.de>2011-06-09 09:45:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-06-10 08:25:32 +0200
commitaf2649b795f28a76d284b2548719dd3ae5e668ea (patch)
tree807968a1ff5b0c3a53a01cb3040f2f3e68aaedd4 /defaultenv
parent6e27bfb15e4e2446753fe9affcc3128772205cec (diff)
downloadbarebox-af2649b795f28a76d284b2548719dd3ae5e668ea.tar.gz
barebox-af2649b795f28a76d284b2548719dd3ae5e668ea.tar.xz
Check return values of erase and tftp/cp
The _update script does not check the return value of erasing a partiton or flashing the image to the device. Added this check to get a evaluable return value from the update script. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/_update6
1 files changed, 3 insertions, 3 deletions
diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update
index f736acc744..1bcb71c9b2 100644
--- a/defaultenv/bin/_update
+++ b/defaultenv/bin/_update
@@ -35,16 +35,16 @@ unprotect $part
echo
echo "erasing partition $part"
echo
-erase $part
+erase $part || exit 1
echo
echo "flashing $image to $part"
echo
if [ x$mode = xtftp ]; then
- tftp $image $part
+ tftp $image $part || exit 1
else
- cp $image $part
+ cp $image $part || exit 1
fi
protect $part