summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-07-31 20:28:24 +0200
committerDoug Zongker <dougz@android.com>2013-07-31 20:35:12 +0200
commitc0441d171914e59941ec4f815ae0aabf56d6504f (patch)
tree2382931433409feae532e7a7fb4ac05016336196 /recovery.cpp
parentMerge "start healthd in recovery" (diff)
downloadandroid_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.tar
android_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.tar.gz
android_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.tar.bz2
android_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.tar.lz
android_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.tar.xz
android_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.tar.zst
android_bootable_recovery-c0441d171914e59941ec4f815ae0aabf56d6504f.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/recovery.cpp b/recovery.cpp
index c5a589cc6..38366b65a 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -75,6 +75,7 @@ static const char *SIDELOAD_TEMP_DIR = "/tmp/sideload";
RecoveryUI* ui = NULL;
char* locale = NULL;
+char recovery_version[PROPERTY_VALUE_MAX+1];
/*
* The recovery tool communicates with the main system through /cache files.
@@ -526,21 +527,17 @@ copy_sideloaded_package(const char* original_path) {
static const char**
prepend_title(const char* const* headers) {
- const char* title[] = { "Android system recovery <"
- EXPAND(RECOVERY_API_VERSION) "e>",
- "",
- NULL };
-
// count the number of lines in our title, plus the
// caller-provided headers.
- int count = 0;
+ int count = 3; // our title has 3 lines
const char* const* p;
- for (p = title; *p; ++p, ++count);
for (p = headers; *p; ++p, ++count);
const char** new_headers = (const char**)malloc((count+1) * sizeof(char*));
const char** h = new_headers;
- for (p = title; *p; ++p, ++h) *h = *p;
+ *(h++) = "Android system recovery <" EXPAND(RECOVERY_API_VERSION) "e>";
+ *(h++) = recovery_version;
+ *(h++) = "";
for (p = headers; *p; ++p, ++h) *h = *p;
*h = NULL;
@@ -1022,6 +1019,7 @@ main(int argc, char **argv) {
printf("\n");
property_list(print_property, NULL);
+ property_get("ro.build.display.id", recovery_version, "");
printf("\n");
int status = INSTALL_SUCCESS;