diff options
author | Riley Andrews <riandrews@google.com> | 2014-07-14 19:33:12 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-07-14 17:12:08 +0000 |
commit | ebf9f8f1e87c5eeb667c4169f7d5c9626e1811c9 (patch) | |
tree | cc9b1c78d173a14c92451a8cba5716feb960cbc6 | |
parent | 981dcd79d5cbfb2192dc14706e2825b81a467af7 (diff) | |
parent | 9464e5a58da50f6cc3503020b38181150cfd01c4 (diff) | |
download | system_core-ebf9f8f1e87c5eeb667c4169f7d5c9626e1811c9.zip system_core-ebf9f8f1e87c5eeb667c4169f7d5c9626e1811c9.tar.gz system_core-ebf9f8f1e87c5eeb667c4169f7d5c9626e1811c9.tar.bz2 |
Merge "Move unlink("/dev/.booting") until after filesystems are mounted."
-rw-r--r-- | init/init.c | 23 | ||||
-rw-r--r-- | rootdir/init.rc | 7 |
2 files changed, 15 insertions, 15 deletions
diff --git a/init/init.c b/init/init.c index 74c0308..bd1db7a 100644 --- a/init/init.c +++ b/init/init.c @@ -817,27 +817,21 @@ static int property_service_init_action(int nargs, char **args) * that /data/local.prop cannot interfere with them. */ start_property_service(); + if (get_property_set_fd() < 0) { + ERROR("start_property_service() failed\n"); + exit(1); + } + return 0; } static int signal_init_action(int nargs, char **args) { signal_init(); - return 0; -} - -static int check_startup_action(int nargs, char **args) -{ - /* make sure we actually have all the pieces we need */ - if ((get_property_set_fd() < 0) || - (get_signal_fd() < 0)) { - ERROR("init startup failure\n"); + if (get_signal_fd() < 0) { + ERROR("signal_init() failed\n"); exit(1); } - - /* signal that we hit this point */ - unlink("/dev/.booting"); - return 0; } @@ -1098,7 +1092,6 @@ int main(int argc, char **argv) queue_builtin_action(mix_hwrng_into_linux_rng_action, "mix_hwrng_into_linux_rng"); queue_builtin_action(property_service_init_action, "property_service_init"); queue_builtin_action(signal_init_action, "signal_init"); - queue_builtin_action(check_startup_action, "check_startup"); /* Don't mount filesystems or start core system services if in charger mode. */ if (is_charger) { @@ -1107,7 +1100,7 @@ int main(int argc, char **argv) action_for_each_trigger("late-init", action_add_queue_tail); } - /* run all property triggers based on current state of the properties */ + /* run all property triggers based on current state of the properties */ queue_builtin_action(queue_property_triggers_action, "queue_property_triggers"); diff --git a/rootdir/init.rc b/rootdir/init.rc index e2bc5b3..2c967cc 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -164,6 +164,10 @@ on property:sys.boot_from_charger_mode=1 on load_all_props_action load_all_props +# Indicate to fw loaders that the relevant mounts are up. +on firmware_mounts_complete + rm /dev/.booting + # Mount filesystems and start core system services. on late-init trigger early-fs @@ -179,6 +183,9 @@ on late-init trigger early-boot trigger boot + # Remove a file to wake up anything waiting for firmware + trigger firmware_mounts_complete + on post-fs # once everything is setup, no need to modify / mount rootfs rootfs / ro remount |