From f038ca00f433100290f74fbcb1174a5e8cca4936 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 10 Dec 2016 09:24:50 -0800 Subject: [PATCH] recovery: Remove obsolete code that supports "CACHE:foo" format. The passing of "--update_package=CACHE:foo" format has been removed in Gingerbread, with commit 4baf641e7d96375eba3f9a3aff5400b9e3d28cd6 in frameworks/base (core/java/android/os/RecoverySystem.java). Test: Recovery image with --update_package still works. Change-Id: I37b56ccf98f62cadf2a3975bbc38b16fea6fe9a1 --- recovery.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/recovery.cpp b/recovery.cpp index e16f28c7..e777c46c 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1525,27 +1525,7 @@ int main(int argc, char **argv) { for (const auto& arg : args) { printf(" \"%s\"", arg.c_str()); } - printf("\n"); - - if (update_package) { - // For backwards compatibility on the cache partition only, if - // we're given an old 'root' path "CACHE:foo", change it to - // "/cache/foo". - if (strncmp(update_package, "CACHE:", 6) == 0) { - int len = strlen(update_package) + 10; - char* modified_path = (char*)malloc(len); - if (modified_path) { - strlcpy(modified_path, "/cache/", len); - strlcat(modified_path, update_package+6, len); - printf("(replacing path \"%s\" with \"%s\")\n", - update_package, modified_path); - update_package = modified_path; - } - else - printf("modified_path allocation failed\n"); - } - } - printf("\n"); + printf("\n\n"); property_list(print_property, NULL); printf("\n");