9
0
Fork 0

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>
This commit is contained in:
Teresa Gamez 2011-06-09 09:45:31 +02:00 committed by Sascha Hauer
parent 6e27bfb15e
commit af2649b795
1 changed files with 3 additions and 3 deletions

View File

@ -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