Merge "reboot: only run fsck when detecting filesystem inconsistency" am: 91b5adfc88

am: a030ede795

Change-Id: Ideab753a0b71dcb5cf26e3f05679497cc204da96
This commit is contained in:
Randall Huang 2019-01-17 09:15:48 -08:00 committed by android-build-merger
commit 96b87d510c

View file

@ -103,13 +103,17 @@ class MountEntry {
int st;
if (IsF2Fs()) {
const char* f2fs_argv[] = {
"/system/bin/fsck.f2fs", "-f", mnt_fsname_.c_str(),
"/system/bin/fsck.f2fs",
"-a",
mnt_fsname_.c_str(),
};
android_fork_execvp_ext(arraysize(f2fs_argv), (char**)f2fs_argv, &st, true, LOG_KLOG,
true, nullptr, nullptr, 0);
} else if (IsExt4()) {
const char* ext4_argv[] = {
"/system/bin/e2fsck", "-f", "-y", mnt_fsname_.c_str(),
"/system/bin/e2fsck",
"-y",
mnt_fsname_.c_str(),
};
android_fork_execvp_ext(arraysize(ext4_argv), (char**)ext4_argv, &st, true, LOG_KLOG,
true, nullptr, nullptr, 0);