diff options
author | Nikita Ioffe <ioffe@google.com> | 2020-01-15 23:23:13 +0000 |
---|---|---|
committer | Nikita Ioffe <ioffe@google.com> | 2020-01-23 00:12:02 +0000 |
commit | 4a787d96ceda4981b53cade7270b9cb27017c840 (patch) | |
tree | 3f46d04f29d75eb8171e6c6b7bd7c68c26fc1cd5 /init/builtins.cpp | |
parent | 929c9e8b40fe6adb23a140a8584d69edb2cab636 (diff) |
Whitelist reboot reasons related to userspace reboot failure
Test: system/core/bootstat/boot_reason_test.sh
Bug: 135984674
Change-Id: I31422329f1109273909293a83913ae801eb1fe52
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index c87759016..742e0896d 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -1123,6 +1123,7 @@ static Result<void> ExecVdcRebootOnFailure(const std::string& vdc_arg) { auto reboot_reason = vdc_arg + "_failed"; if (android::sysprop::InitProperties::userspace_reboot_in_progress().value_or(false)) { should_reboot_into_recovery = false; + reboot_reason = "userspace_failed," + vdc_arg; } auto reboot = [reboot_reason, should_reboot_into_recovery](const std::string& message) { @@ -1159,7 +1160,7 @@ static Result<void> do_remount_userdata(const BuiltinArguments& args) { } // TODO(b/135984674): check that fstab contains /data. if (auto rc = fs_mgr_remount_userdata_into_checkpointing(&fstab); rc < 0) { - trigger_shutdown("reboot,mount-userdata-failed"); + trigger_shutdown("reboot,mount_userdata_failed"); } if (auto result = queue_fs_event(initial_mount_fstab_return_code, true); !result) { return Error() << "queue_fs_event() failed: " << result.error(); |