summaryrefslogtreecommitdiffstats
path: root/updater/updater.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-02-02 22:09:52 +0100
committerDoug Zongker <dougz@android.com>2010-02-03 18:20:07 +0100
commite08991e02a7d678f2574e85289a34b2a9a537c82 (patch)
treeca53b4adbf66388805a47f93c440412be552761c /updater/updater.c
parentMerge "change log recovery to generic device_recovery_start function" (diff)
downloadandroid_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.tar
android_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.tar.gz
android_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.tar.bz2
android_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.tar.lz
android_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.tar.xz
android_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.tar.zst
android_bootable_recovery-e08991e02a7d678f2574e85289a34b2a9a537c82.zip
Diffstat (limited to '')
-rw-r--r--updater/updater.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/updater/updater.c b/updater/updater.c
index 1aa277c7f..2d16deeba 100644
--- a/updater/updater.c
+++ b/updater/updater.c
@@ -39,9 +39,11 @@ int main(int argc, char** argv) {
}
char* version = argv[1];
- 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",
+ if ((version[0] != '1' && version[0] != '2' && version[0] != '3') ||
+ version[1] != '\0') {
+ // We support version 1, 2, or 3.
+ fprintf(stderr, "wrong updater binary API; expected 1, 2, or 3; "
+ "got %s\n",
argv[1]);
return 2;
}
@@ -100,6 +102,7 @@ int main(int argc, char** argv) {
UpdaterInfo updater_info;
updater_info.cmd_pipe = cmd_pipe;
updater_info.package_zip = &za;
+ updater_info.version = atoi(version);
State state;
state.cookie = &updater_info;