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

Commit 516d6913 authored by Christopher R. Palmer's avatar Christopher R. Palmer
Browse files

init: Allow devices to opt-out of fsck'ing on power off

On the zenfone2 the fsck code patch kills alls processes.  This causes
watchdogd to get killed which then causes the system to emergency reboot
instead of powering off.

Change-Id: Ibcc74825df6571caa70e2dde7766a72b7749581b
parent 8284bce0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -68,6 +68,10 @@ ifneq ($(TARGET_IGNORE_RO_BOOT_REVISION),)
LOCAL_CFLAGS += -DIGNORE_RO_BOOT_REVISION
endif

ifneq ($(TARGET_INIT_UMOUNT_AND_FSCK_IS_UNSAFE),)
LOCAL_CFLAGS += -DUMOUNT_AND_FSCK_IS_UNSAFE
endif

LOCAL_MODULE:= init
LOCAL_C_INCLUDES += \
    external/zlib \
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ static void service_start_if_not_disabled(struct service *svc)

static void unmount_and_fsck(const struct mntent *entry)
{
#ifndef UMOUNT_AND_FSCK_IS_UNSAFE
    if (strcmp(entry->mnt_type, "f2fs") && strcmp(entry->mnt_type, "ext4"))
        return;

@@ -173,6 +174,7 @@ static void unmount_and_fsck(const struct mntent *entry)
        android_fork_execvp_ext(ARRAY_SIZE(ext4_argv), (char **)ext4_argv,
                                &st, true, LOG_KLOG, true, NULL);
    }
#endif
}

int do_class_start(int nargs, char **args)