summaryrefslogtreecommitdiffstats
path: root/recovery.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2009-06-18 07:07:13 +0200
committerDoug Zongker <dougz@android.com>2009-06-18 07:07:13 +0200
commitd683785ec9d36a9f4c7de1983f69a1f049132365 (patch)
tree23ad6c933463bd0506ce492b7fba92dc7006ae48 /recovery.c
parentam e3da02e7: add less_than_int, greater_than_int to edify (diff)
parentlet the "firmware" command take the file straight from the package (diff)
downloadandroid_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.tar
android_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.tar.gz
android_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.tar.bz2
android_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.tar.lz
android_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.tar.xz
android_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.tar.zst
android_bootable_recovery-d683785ec9d36a9f4c7de1983f69a1f049132365.zip
Diffstat (limited to 'recovery.c')
-rw-r--r--recovery.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/recovery.c b/recovery.c
index 6c13b9f31..8ad133948 100644
--- a/recovery.c
+++ b/recovery.c
@@ -288,7 +288,25 @@ erase_root(const char *root)
static void
prompt_and_wait()
{
- ui_start_menu(MENU_HEADERS, MENU_ITEMS);
+ char* title[] = { "Android system recovery <"
+ EXPAND(RECOVERY_API_VERSION) ">",
+ "",
+ NULL };
+
+ // count the number of lines in our title, plus the
+ // product-provided headers.
+ int count = 0;
+ char** p;
+ for (p = title; *p; ++p, ++count);
+ for (p = MENU_HEADERS; *p; ++p, ++count);
+
+ char** headers = malloc((count+1) * sizeof(char*));
+ char** h = headers;
+ for (p = title; *p; ++p, ++h) *h = *p;
+ for (p = MENU_HEADERS; *p; ++p, ++h) *h = *p;
+ *h = NULL;
+
+ ui_start_menu(headers, MENU_ITEMS);
int selected = 0;
int chosen_item = -1;
@@ -370,7 +388,7 @@ prompt_and_wait()
// if we didn't return from this function to reboot, show
// the menu again.
- ui_start_menu(MENU_HEADERS, MENU_ITEMS);
+ ui_start_menu(headers, MENU_ITEMS);
selected = 0;
chosen_item = -1;