summaryrefslogtreecommitdiffstats
path: root/fastboot/fastboot.h
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2010-04-23 12:38:51 -0700
committerBrian Carlstrom <bdc@google.com>2010-04-23 12:45:38 -0700
commiteb31c0bdc0eac0898f01cdc1737cea94269f8f27 (patch)
treee556012c4e02e83ee62629dedde3294d0c45cdc9 /fastboot/fastboot.h
parentf538d8c76b9fb8377f279cd4e8227d2c389e7767 (diff)
downloadcore-eb31c0bdc0eac0898f01cdc1737cea94269f8f27.tar.gz
core-eb31c0bdc0eac0898f01cdc1737cea94269f8f27.tar.bz2
core-eb31c0bdc0eac0898f01cdc1737cea94269f8f27.zip
fastboot should return non-zero exit code on error
When using fastboot in scripts, it currently is necessary to parse the output for FAILED messages and possible other indications of error. This happens relatively often, for example when there are radio update issues. Fortunately, fb_execute_queue already has a notion that an error has occured which is used to abort the queue execution. This change makes the status value be returned from fb_execute_queue to main which can then return it as an exit status. usage cases were also changed to return 1. Note the code already returned 1 for error in one other case when there was a problem with boot, so there is a precedent for return 1 on error in this program. Change-Id: Ib0463b08c8f2569495e248dd84e331f7e3691039
Diffstat (limited to 'fastboot/fastboot.h')
-rw-r--r--fastboot/fastboot.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fastboot/fastboot.h b/fastboot/fastboot.h
index a36c569e1..a4b27a02f 100644
--- a/fastboot/fastboot.h
+++ b/fastboot/fastboot.h
@@ -49,7 +49,7 @@ void fb_queue_reboot(void);
void fb_queue_command(const char *cmd, const char *msg);
void fb_queue_download(const char *name, void *data, unsigned size);
void fb_queue_notice(const char *notice);
-void fb_execute_queue(usb_handle *usb);
+int fb_execute_queue(usb_handle *usb);
/* util stuff */
void die(const char *fmt, ...);