summaryrefslogtreecommitdiff
path: root/init/builtins.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2017-09-15 21:14:08 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-09-15 21:14:08 +0000
commit6fc9bf6c190aff6212968cf4d7bcc4f3377fbdee (patch)
treedac21b513c1fb84e3c77b0c94680ad58c039d5a7 /init/builtins.cpp
parent2f8ac6ea6fc6314d50ac26f1b001feda8ee9dc20 (diff)
parent71df3d8bca816d0e4cdcda4b878e0665bcab360b (diff)
Merge "init: fix crash when reboot is triggered by a builtin"
am: b92415cee2 Change-Id: I4137679d88e58c706f14adeeaf84b41426079de4
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r--init/builtins.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index d77abdf526..96e78cbd42 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -267,7 +267,7 @@ static Result<Success> do_mkdir(const std::vector<std::string>& args) {
"--prompt_and_wipe_data",
"--reason=set_policy_failed:"s + args[1]};
reboot_into_recovery(options);
- return Error() << "reboot into recovery failed";
+ return Success();
}
}
return Success();
@@ -472,7 +472,7 @@ static Result<Success> queue_fs_event(int code) {
PLOG(ERROR) << "fs_mgr_mount_all suggested recovery, so wiping data via recovery.";
const std::vector<std::string> options = {"--wipe_data", "--reason=fs_mgr_mount_all" };
reboot_into_recovery(options);
- return Error() << "reboot_into_recovery() failed";
+ return Success();
/* If reboot worked, there is no return. */
} else if (code == FS_MGR_MNTALL_DEV_FILE_ENCRYPTED) {
if (e4crypt_install_keyring()) {