diff options
author | Ken Sumrall <ksumrall@android.com> | 2011-05-26 20:01:39 -0700 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2011-05-26 20:01:39 -0700 |
commit | 7bc6e9ebe4783d5fbae17d7249cb80e997531598 (patch) | |
tree | d85127e9b6db0ff97f92278a4ea35464bb3c6918 | |
parent | b05b0b5d3b01441d648782f552d9f7e2d7bfbbc1 (diff) | |
download | system_core-7bc6e9ebe4783d5fbae17d7249cb80e997531598.zip system_core-7bc6e9ebe4783d5fbae17d7249cb80e997531598.tar.gz system_core-7bc6e9ebe4783d5fbae17d7249cb80e997531598.tar.bz2 |
Teach the mount command in init to not consider a wiped partition to be encrypted.
Change-Id: I3e989f0b81ec35084baddc04e014406f4d90ce04
-rw-r--r-- | init/builtins.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/init/builtins.c b/init/builtins.c index f2f76b7..23ef224 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -30,6 +30,7 @@ #include <sys/mount.h> #include <sys/resource.h> #include <linux/loop.h> +#include <cutils/partition_utils.h> #include "init.h" #include "keywords.h" @@ -367,7 +368,9 @@ int do_mount(int nargs, char **args) if (wait) wait_for_file(source, COMMAND_RETRY_TIMEOUT); if (mount(source, target, system, flags, options) < 0) { - /* If this fails, it may be an encrypted filesystem. + /* If this fails, it may be an encrypted filesystem + * or it could just be wiped. If wiped, that will be + * handled later in the boot process. * We only support encrypting /data. Check * if we're trying to mount it, and if so, * assume it's encrypted, mount a tmpfs instead. @@ -375,7 +378,7 @@ int do_mount(int nargs, char **args) * for vold to query when it mounts the real * encrypted /data. */ - if (!strcmp(target, DATA_MNT_POINT)) { + if (!strcmp(target, DATA_MNT_POINT) && !partition_wiped(source)) { const char *tmpfs_options; tmpfs_options = property_get("ro.crypto.tmpfs_options"); |