diff options
-rw-r--r-- | init/Android.mk | 4 | ||||
-rw-r--r-- | init/builtins.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/init/Android.mk b/init/Android.mk index aa32236..85dfbfc 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -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 \ diff --git a/init/builtins.cpp b/init/builtins.cpp index d0dbecc..1681d17 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -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) |