diff options
Diffstat (limited to 'init/reboot.cpp')
-rw-r--r-- | init/reboot.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/init/reboot.cpp b/init/reboot.cpp index a0ae4b4d4..845bdb949 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -54,6 +54,8 @@ #include <private/android_filesystem_config.h> #include <selinux/selinux.h> +#include <cutils/properties.h> + #include "action.h" #include "action_manager.h" #include "builtin_arguments.h" @@ -425,11 +427,17 @@ static UmountStat TryUmountAndFsck(unsigned int cmd, bool run_fsck, UmountStat stat = UmountPartitions(timeout - t.duration()); if (stat != UMOUNT_STAT_SUCCESS) { LOG(INFO) << "umount timeout, last resort, kill all and try"; - if (DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(); + bool dumpUmountDebugInfo = property_get_bool("persist.sys.dumpUmountDebugInfo",false); + if (dumpUmountDebugInfo) { + if (DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(); + } KillAllProcesses(); // even if it succeeds, still it is timeout and do not run fsck with all processes killed UmountStat st = UmountPartitions(0ms); - if ((st != UMOUNT_STAT_SUCCESS) && DUMP_ON_UMOUNT_FAILURE) DumpUmountDebuggingInfo(); + if (dumpUmountDebugInfo) { + if ((st != UMOUNT_STAT_SUCCESS) && DUMP_ON_UMOUNT_FAILURE) + DumpUmountDebuggingInfo(); + } } if (stat == UMOUNT_STAT_SUCCESS && run_fsck) { |