diff options
author | Doug Zongker <dougz@android.com> | 2009-06-17 17:29:40 -0700 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2009-06-17 18:12:16 -0700 |
commit | fb2e3af3f915c0e3f2b4b027ef26777267ad46dc (patch) | |
tree | 45e7354eacc638f4176a095844258d1f313aba7b /updater/updater.c | |
parent | e3da02e7bcfd85c543419e7590a3c86f64d8cc8a (diff) | |
download | bootable_recovery-fb2e3af3f915c0e3f2b4b027ef26777267ad46dc.zip bootable_recovery-fb2e3af3f915c0e3f2b4b027ef26777267ad46dc.tar.gz bootable_recovery-fb2e3af3f915c0e3f2b4b027ef26777267ad46dc.tar.bz2 |
let the "firmware" command take the file straight from the package
To do a firmware-install-on-reboot, the update binary tells recovery
what file to install before rebooting. Let this file be specified as
"PACKAGE:<foo>" to indicate taking the file out of the OTA package,
avoiding an extra copy to /tmp. Bump the API version number to
reflect this change.
Diffstat (limited to 'updater/updater.c')
-rw-r--r-- | updater/updater.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/updater/updater.c b/updater/updater.c index 5a2ed2c..31d93ae 100644 --- a/updater/updater.c +++ b/updater/updater.c @@ -34,9 +34,10 @@ int main(int argc, char** argv) { } char* version = argv[1]; - if (version[0] != '1' || version[1] != '\0') { - fprintf(stderr, "wrong updater binary API; expected 1, got %s\n", - version); + if ((version[0] != '1' && version[0] != '2') || version[1] != '\0') { + // We support version "1" or "2". + fprintf(stderr, "wrong updater binary API; expected 1 or 2, got %s\n", + argv[1]); return 2; } |