From 4fcd523ded484d7c53405fc019142dd1fad84360 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 28 Oct 2011 11:47:02 -0700 Subject: [PATCH] fix driver looking for recovery, rather than checking the basename. fix badness in nandroid menu generation. Change-Id: I7d7011e36583509f07534e4bc85ed8d567022d3e --- extendedcommands.c | 2 +- recovery.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extendedcommands.c b/extendedcommands.c index 9e63782..e152c4a 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -804,7 +804,7 @@ void show_nandroid_menu() }; if (volume_for_path("/emmc") == NULL) - INSTALL_MENU_ITEMS[3] = NULL; + list[3] = NULL; int chosen_item = get_menu_selection(headers, list, 0, 0); switch (chosen_item) diff --git a/recovery.c b/recovery.c index 7e4ed09..d0dbe0b 100644 --- a/recovery.c +++ b/recovery.c @@ -767,7 +767,7 @@ print_property(const char *key, const char *name, void *cookie) { int main(int argc, char **argv) { - if (strstr(argv[0], "recovery") == NULL) + if (strcmp(basename(argv[0]), "recovery") != 0) { if (strstr(argv[0], "flash_image") != NULL) return flash_image_main(argc, argv);