mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Gamez <T.Gamez@phytec.de>
To: barebox@lists.infradead.org
Cc: J.Kilb@phytec.de
Subject: [PATCH] [defaultenv/bin/_update] Check return values of erase and tftp/cp
Date: Thu, 09 Jun 2011 09:45:31 +0200	[thread overview]
Message-ID: <1307605531.3146.1386.camel@lws-gamez> (raw)

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

                 reply	other threads:[~2011-06-09  7:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307605531.3146.1386.camel@lws-gamez \
    --to=t.gamez@phytec.de \
    --cc=J.Kilb@phytec.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox