Loading init/builtins.cpp +8 −18 Original line number Diff line number Diff line Loading @@ -1137,16 +1137,10 @@ static Result<void> ExecWithFunctionOnFailure(const std::vector<std::string>& ar } static Result<void> ExecVdcRebootOnFailure(const std::string& vdc_arg) { bool should_reboot_into_recovery = true; 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) { auto reboot = [reboot_reason](const std::string& message) { // TODO (b/122850122): support this in gsi if (should_reboot_into_recovery) { if (IsFbeEnabled() && !android::gsi::IsGsiRunning()) { LOG(ERROR) << message << ": Rebooting into recovery, reason: " << reboot_reason; if (auto result = reboot_into_recovery( Loading @@ -1157,10 +1151,6 @@ static Result<void> ExecVdcRebootOnFailure(const std::string& vdc_arg) { } else { LOG(ERROR) << "Failure (reboot suppressed): " << reboot_reason; } } else { LOG(ERROR) << message << ": rebooting, reason: " << reboot_reason; trigger_shutdown("reboot," + reboot_reason); } }; std::vector<std::string> args = {"exec", "/system/bin/vdc", "--wait", "cryptfs", vdc_arg}; Loading Loading
init/builtins.cpp +8 −18 Original line number Diff line number Diff line Loading @@ -1137,16 +1137,10 @@ static Result<void> ExecWithFunctionOnFailure(const std::vector<std::string>& ar } static Result<void> ExecVdcRebootOnFailure(const std::string& vdc_arg) { bool should_reboot_into_recovery = true; 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) { auto reboot = [reboot_reason](const std::string& message) { // TODO (b/122850122): support this in gsi if (should_reboot_into_recovery) { if (IsFbeEnabled() && !android::gsi::IsGsiRunning()) { LOG(ERROR) << message << ": Rebooting into recovery, reason: " << reboot_reason; if (auto result = reboot_into_recovery( Loading @@ -1157,10 +1151,6 @@ static Result<void> ExecVdcRebootOnFailure(const std::string& vdc_arg) { } else { LOG(ERROR) << "Failure (reboot suppressed): " << reboot_reason; } } else { LOG(ERROR) << message << ": rebooting, reason: " << reboot_reason; trigger_shutdown("reboot," + reboot_reason); } }; std::vector<std::string> args = {"exec", "/system/bin/vdc", "--wait", "cryptfs", vdc_arg}; Loading