summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2014-05-01 22:58:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-01 22:58:33 +0000
commit16401748204a2088aaba68e16d9b1e4d96b5c67d (patch)
tree214683a6217d421fe778e6439261aeea77b038cd
parentbe338f10f4d002023b0c1acc3d8db8687f068c27 (diff)
parent2a25d991d698e210611865ee95ba02ed1d40b1c7 (diff)
downloadsystem_core-16401748204a2088aaba68e16d9b1e4d96b5c67d.zip
system_core-16401748204a2088aaba68e16d9b1e4d96b5c67d.tar.gz
system_core-16401748204a2088aaba68e16d9b1e4d96b5c67d.tar.bz2
Merge changes Ibff1f74e,Ic82595cf
* changes: fastboot: Added tos as an optional image fastboot: Fixed optional entries
-rw-r--r--fastboot/fastboot.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c
index 7f49ae9..f98268e 100644
--- a/fastboot/fastboot.c
+++ b/fastboot/fastboot.c
@@ -100,10 +100,11 @@ static struct {
char sig_name[13];
char part_name[9];
bool is_optional;
-} images[3] = {
+} images[4] = {
{"boot.img", "boot.sig", "boot", false},
{"recovery.img", "recovery.sig", "recovery", true},
{"system.img", "system.sig", "system", false},
+ {"tos.img", "tos.sig", "tos", true},
};
void get_my_path(char *path);
@@ -120,6 +121,8 @@ char *find_item(const char *item, const char *product)
fn = "recovery.img";
} else if(!strcmp(item,"system")) {
fn = "system.img";
+ } else if(!strcmp(item,"tos")) {
+ fn = "tos.img";
} else if(!strcmp(item,"userdata")) {
fn = "userdata.img";
} else if(!strcmp(item,"cache")) {
@@ -285,7 +288,7 @@ void usage(void)
"\n"
"commands:\n"
" update <filename> reflash device from update.zip\n"
- " flashall flash boot + recovery + system\n"
+ " flashall flash boot, system, and if found, recovery, tos\n"
" flash <partition> [ <filename> ] write a file to a flash partition\n"
" erase <partition> erase a flash partition\n"
" format <partition> format a flash partition \n"
@@ -657,7 +660,7 @@ static int load_buf(usb_handle *usb, const char *fname,
fd = open(fname, O_RDONLY | O_BINARY);
if (fd < 0) {
- die("cannot open '%s'\n", fname);
+ return -1;
}
return load_buf_fd(usb, fd, buf);