mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] [defaultenv/bin/_update] Check return values of erase and tftp/cp
@ 2011-06-09  7:45 Teresa Gamez
  0 siblings, 0 replies; only message in thread
From: Teresa Gamez @ 2011-06-09  7:45 UTC (permalink / raw)
  To: barebox; +Cc: J.Kilb

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>
---
 defaultenv/bin/_update |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update
index f736acc..1bcb71c 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
-- 
1.7.0.4





_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-09  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09  7:45 [PATCH] [defaultenv/bin/_update] Check return values of erase and tftp/cp Teresa Gamez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox