aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphilz-cwm6 <phytowardt@gmail.com>2013-06-12 15:54:08 +0200
committerMichael Bestas <mikeioannina@gmail.com>2013-07-14 11:08:03 -0700
commita4be87f38f48758c63a988d34390aab1ffbc9f7d (patch)
treeeef993faf900c82269415dd8b8f0af633cfcf885
parentcfb115f449a1905ffc8bd2a2bdfa2a322ee56f80 (diff)
downloadbootable_recovery-a4be87f38f48758c63a988d34390aab1ffbc9f7d.zip
bootable_recovery-a4be87f38f48758c63a988d34390aab1ffbc9f7d.tar.gz
bootable_recovery-a4be87f38f48758c63a988d34390aab1ffbc9f7d.tar.bz2
Add sdparted option to partition in ext4 fstype
Taken from PhilZ Touch recovery Signed-off-by: Michael Bestas <mikeioannina@gmail.com> Change-Id: I079617fc32f8ad0aea754a60898cd4f9cc482524
-rw-r--r--extendedcommands.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/extendedcommands.c b/extendedcommands.c
index 5b6e52f..2aa5174 100644
--- a/extendedcommands.c
+++ b/extendedcommands.c
@@ -1262,8 +1262,14 @@ static void partition_sdcard(const char* volume) {
"256M",
NULL };
+ static char* partition_types[] = { "ext3",
+ "ext4",
+ NULL
+ };
+
static char* ext_headers[] = { "Ext Size", "", NULL };
static char* swap_headers[] = { "Swap Size", "", NULL };
+ static char* fstype_headers[] = {"Partition Type", "", NULL };
int ext_size = get_menu_selection(ext_headers, ext_sizes, 0, 0);
if (ext_size == GO_BACK)
@@ -1273,6 +1279,10 @@ static void partition_sdcard(const char* volume) {
if (swap_size == GO_BACK)
return;
+ int partition_type = get_menu_selection(fstype_headers, partition_types, 0, 0);
+ if (partition_type == GO_BACK)
+ return;
+
char sddevice[256];
Volume *vol = volume_for_path(volume);
strcpy(sddevice, vol->device);
@@ -1280,7 +1290,7 @@ static void partition_sdcard(const char* volume) {
sddevice[strlen("/dev/block/mmcblkX")] = NULL;
char cmd[PATH_MAX];
setenv("SDPATH", sddevice, 1);
- sprintf(cmd, "sdparted -es %s -ss %s -efs ext3 -s", ext_sizes[ext_size], swap_sizes[swap_size]);
+ sprintf(cmd, "sdparted -es %s -ss %s -efs %s -s", ext_sizes[ext_size], swap_sizes[swap_size], partition_types[partition_type]);
ui_print("Partitioning SD Card... please wait...\n");
if (0 == __system(cmd))
ui_print("Done!\n");