Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebf9f8f1 authored by Riley Andrews's avatar Riley Andrews Committed by Gerrit Code Review
Browse files

Merge "Move unlink("/dev/.booting") until after filesystems are mounted."

parents 981dcd79 9464e5a5
Loading
Loading
Loading
Loading
+8 −15
Original line number Diff line number Diff line
@@ -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();
    return 0;
    if (get_property_set_fd() < 0) {
        ERROR("start_property_service() failed\n");
        exit(1);
    }

static int signal_init_action(int nargs, char **args)
{
    signal_init();
    return 0;
}

static int check_startup_action(int nargs, char **args)
static int signal_init_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");
    signal_init();
    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) {
+7 −0
Original line number Diff line number Diff line
@@ -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