From 722498ab45e87de6ad18d873bc10779d36f6ea1a Mon Sep 17 00:00:00 2001 From: zhang sanshan Date: Tue, 17 Nov 2015 15:21:18 +0800 Subject: Revert "MA-7053 when I add selinux=disable in the cmdline, the board do OTA update will fail" This reverts commit 24356fe059abbc9eae1b192f7af8a46f204a36f4. Conflicts: common/image-android.c --- common/image-android.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'common') diff --git a/common/image-android.c b/common/image-android.c index 27da522..48c223f 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -90,14 +90,8 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify, strcat(commandline, suffixStr); #endif - if (getenv("bootcmd_android_recovery")) { - char new_commandline[ANDR_BOOT_ARGS_SIZE]; - char cmd_selinux[30] = "androidboot.selinux=disabled"; - del_sub_str(commandline, cmd_selinux, new_commandline); - setenv("bootargs", new_commandline); - } else { - setenv("bootargs", commandline); - } + setenv("bootargs", commandline); + if (os_data) { *os_data = (ulong)hdr; *os_data += hdr->page_size; @@ -168,26 +162,3 @@ int android_image_get_fdt(const struct andr_img_hdr *hdr, return 0; } -void del_sub_str(const char *str, const char *sub_str, char *cmdline) -{ - int str_len = strlen(str); - int sub_str_len = strlen(sub_str); - - while (*str != '\0') { - while (*str != *sub_str && *str != '\0') { - *cmdline = *str; - str++; - cmdline++; - } - if (strncmp(str, sub_str, sub_str_len) != 0) { - *cmdline = *str; - str++; - cmdline++; - continue; - } else { - str += sub_str_len; - } - - } - *cmdline = '\0'; -} -- cgit v1.1