aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2011-02-22 12:15:10 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-22 12:15:10 -0800
commit012cf8f2de3cf48645e05209123d11bdb0ed8de7 (patch)
tree1a186c36a574be64b986179f3504f9aebec99281
parent53df0b6393979e7f35ab271683429aa1ea1230cd (diff)
parentdd4d786cbf993a024fcd0f926fd40b90c8a08d51 (diff)
downloadsystem_core-012cf8f2de3cf48645e05209123d11bdb0ed8de7.tar.gz
system_core-012cf8f2de3cf48645e05209123d11bdb0ed8de7.tar.bz2
system_core-012cf8f2de3cf48645e05209123d11bdb0ed8de7.zip
Merge "Fix for bug 3379244, non-eMMC devices don't start all services."
-rw-r--r--init/builtins.c30
-rw-r--r--rootdir/etc/init.goldfish.rc6
2 files changed, 21 insertions, 15 deletions
diff --git a/init/builtins.c b/init/builtins.c
index 490ad480..d9a9634e 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -286,6 +286,7 @@ int do_mount(int nargs, char **args)
unsigned flags = 0;
int n, i;
int wait = 0;
+ char *prop;
for (n = 4; n < nargs; n++) {
for (i = 0; mount_flags[i].name; i++) {
@@ -322,7 +323,7 @@ int do_mount(int nargs, char **args)
return -1;
}
- return 0;
+ goto exit_success;
} else if (!strncmp(source, "loop@", 5)) {
int mode, loop, fd;
struct loop_info info;
@@ -353,7 +354,7 @@ int do_mount(int nargs, char **args)
}
close(loop);
- return 0;
+ goto exit_success;
}
}
@@ -393,12 +394,6 @@ int do_mount(int nargs, char **args)
} else {
return -1;
}
- } else {
- if (!strcmp(target, DATA_MNT_POINT)) {
- /* We succeeded in mounting /data, so it's not encrypted */
- property_set("ro.crypto.state", "unencrypted");
- action_for_each_trigger("nonencrypted", action_add_queue_tail);
- }
}
if (!strcmp(target, DATA_MNT_POINT)) {
@@ -414,8 +409,25 @@ int do_mount(int nargs, char **args)
snprintf(fs_flags, sizeof(fs_flags), "0x%8.8x", flags);
property_set("ro.crypto.fs_flags", fs_flags);
}
- return 0;
}
+
+exit_success:
+ /* If not running encrypted, then set the property saying we are
+ * unencrypted, and also trigger the action for a nonencrypted system.
+ */
+ if (!strcmp(target, DATA_MNT_POINT)) {
+ prop = property_get("ro.crypto.state");
+ if (! prop) {
+ prop = "notset";
+ }
+ if (strcmp(prop, "encrypted")) {
+ property_set("ro.crypto.state", "unencrypted");
+ action_for_each_trigger("nonencrypted", action_add_queue_tail);
+ }
+ }
+
+ return 0;
+
}
int do_setkey(int nargs, char **args)
diff --git a/rootdir/etc/init.goldfish.rc b/rootdir/etc/init.goldfish.rc
index 7cc028ff..1ac09cae 100644
--- a/rootdir/etc/init.goldfish.rc
+++ b/rootdir/etc/init.goldfish.rc
@@ -28,12 +28,6 @@ on boot
start goldfish-logcat
start goldfish-setup
- # This is a workaround for another bug in init and init.rc
- # where the late_start class of services is never started
- # properly when running an unencrypted /data partition.
- #
- start ril-daemon
-
setprop ro.setupwizard.mode EMULATOR
# enable Google-specific location features,