diff options
author | Koushik Dutta <koushd@gmail.com> | 2012-06-17 20:22:22 -0700 |
---|---|---|
committer | Koushik Dutta <koushd@gmail.com> | 2012-06-17 20:23:11 -0700 |
commit | 407183abda027c35b35d4ac7ac43745e70ed1ffa (patch) | |
tree | 41973bfe4aed2edf5a787fced019de2463acb6dc /extendedcommands.c | |
parent | e491f80accc0ddb2c925df18d2b796968e48bb71 (diff) | |
download | bootable_recovery-407183abda027c35b35d4ac7ac43745e70ed1ffa.zip bootable_recovery-407183abda027c35b35d4ac7ac43745e70ed1ffa.tar.gz bootable_recovery-407183abda027c35b35d4ac7ac43745e70ed1ffa.tar.bz2 |
support datamedia on any one volume
Change-Id: I198e789ee01e8a5b10eee33ed59a2d828cfb096a
Diffstat (limited to 'extendedcommands.c')
-rw-r--r-- | extendedcommands.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/extendedcommands.c b/extendedcommands.c index 845626a..220c976 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -444,17 +444,16 @@ int confirm_selection(const char* title, const char* confirm) int format_device(const char *device, const char *path, const char *fs_type) { Volume* v = volume_for_path(path); if (v == NULL) { - // no /sdcard? let's assume /data/media - if (strstr(path, "/sdcard") == path && is_data_media()) { - return format_unknown_device(NULL, path, NULL); - } // silent failure for sd-ext if (strcmp(path, "/sd-ext") == 0) return -1; LOGE("unknown volume \"%s\"\n", path); return -1; } - if (strstr(path, "/data") == path && volume_for_path("/sdcard") == NULL && is_data_media()) { + if (is_data_media_volume_path(path)) { + return format_unknown_device(NULL, path, NULL); + } + if (strstr(path, "/data") == path && is_data_media()) { return format_unknown_device(NULL, path, NULL); } if (strcmp(fs_type, "ramdisk") == 0) { @@ -834,7 +833,7 @@ void show_nandroid_menu() NULL }; - if (volume_for_path("/emmc") == NULL || volume_for_path("/sdcard") == NULL && is_data_media()) + if (volume_for_path("/emmc") == NULL) list[3] = NULL; int chosen_item = get_menu_selection(headers, list, 0, 0); |