diff options
author | Kenny Root <kroot@android.com> | 2012-04-06 18:05:56 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-04-06 18:05:56 -0700 |
commit | 1e4469a7866e4ec3459734b36eef3fb67035b4d4 (patch) | |
tree | 3bfb7657f07e76e39e6c4f5d360197e169012e42 /updater | |
parent | 345544c924c52f5c4d763dede94d45c9cf4dd3e4 (diff) | |
parent | 78911bdf4f9dfff6583f3f8150a3257212ceea13 (diff) | |
download | bootable_recovery-1e4469a7866e4ec3459734b36eef3fb67035b4d4.zip bootable_recovery-1e4469a7866e4ec3459734b36eef3fb67035b4d4.tar.gz bootable_recovery-1e4469a7866e4ec3459734b36eef3fb67035b4d4.tar.bz2 |
am 78911bdf: am 2a4ab824: Merge "Change the format command to always take the mount point as an argument."
* commit '78911bdf4f9dfff6583f3f8150a3257212ceea13':
Change the format command to always take the mount point as an argument.
Diffstat (limited to 'updater')
-rw-r--r-- | updater/install.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/updater/install.c b/updater/install.c index 31f08b8..f981017 100644 --- a/updater/install.c +++ b/updater/install.c @@ -199,27 +199,20 @@ done: // if fs_size == 0, then make_ext4fs uses the entire partition. // if fs_size > 0, that is the size to use // if fs_size < 0, then reserve that many bytes at the end of the partition -// mount_point is used with SELinux as the location of the mount point, absent otherwise Value* FormatFn(const char* name, State* state, int argc, Expr* argv[]) { char* result = NULL; - if (argc != 4 && argc != 5) { - return ErrorAbort(state, "%s() expects 4 or 5 args, got %d", name, argc); + if (argc != 5) { + return ErrorAbort(state, "%s() expects 5 args, got %d", name, argc); } char* fs_type; char* partition_type; char* location; char* fs_size; - char* mount_point = NULL; + char* mount_point; -#ifdef HAVE_SELINUX if (ReadArgs(state, argv, 5, &fs_type, &partition_type, &location, &fs_size, &mount_point) < 0) { return NULL; } -#else - if (ReadArgs(state, argv, 4, &fs_type, &partition_type, &location, &fs_size) < 0) { - return NULL; - } -#endif if (strlen(fs_type) == 0) { ErrorAbort(state, "fs_type argument to %s() can't be empty", name); @@ -235,12 +228,10 @@ Value* FormatFn(const char* name, State* state, int argc, Expr* argv[]) { goto done; } -#ifdef HAVE_SELINUX - if (!mount_point || strlen(mount_point) == 0) { + if (strlen(mount_point) == 0) { ErrorAbort(state, "mount_point argument to %s() can't be empty", name); goto done; } -#endif if (strcmp(partition_type, "MTD") == 0) { mtd_scan_partitions(); |