Merge "init: fix last_reboot_reason string"
am: 59c74a3bd1
Change-Id: I77a91f303ffce4f040d774047d2c72920c1acaee
This commit is contained in:
commit
2be5884903
1 changed files with 1 additions and 3 deletions
|
|
@ -423,7 +423,6 @@ void DoReboot(unsigned int cmd, const std::string& reason, const std::string& re
|
||||||
bool HandlePowerctlMessage(const std::string& command) {
|
bool HandlePowerctlMessage(const std::string& command) {
|
||||||
unsigned int cmd = 0;
|
unsigned int cmd = 0;
|
||||||
std::vector<std::string> cmd_params = android::base::Split(command, ",");
|
std::vector<std::string> cmd_params = android::base::Split(command, ",");
|
||||||
std::string reason_string = cmd_params[0];
|
|
||||||
std::string reboot_target = "";
|
std::string reboot_target = "";
|
||||||
bool run_fsck = false;
|
bool run_fsck = false;
|
||||||
bool command_invalid = false;
|
bool command_invalid = false;
|
||||||
|
|
@ -436,7 +435,6 @@ bool HandlePowerctlMessage(const std::string& command) {
|
||||||
// The shutdown reason is PowerManager.SHUTDOWN_USER_REQUESTED.
|
// The shutdown reason is PowerManager.SHUTDOWN_USER_REQUESTED.
|
||||||
// Run fsck once the file system is remounted in read-only mode.
|
// Run fsck once the file system is remounted in read-only mode.
|
||||||
run_fsck = true;
|
run_fsck = true;
|
||||||
reason_string = cmd_params[1];
|
|
||||||
}
|
}
|
||||||
} else if (cmd_params[0] == "reboot") {
|
} else if (cmd_params[0] == "reboot") {
|
||||||
cmd = ANDROID_RB_RESTART2;
|
cmd = ANDROID_RB_RESTART2;
|
||||||
|
|
@ -467,6 +465,6 @@ bool HandlePowerctlMessage(const std::string& command) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoReboot(cmd, reason_string, reboot_target, run_fsck);
|
DoReboot(cmd, command, reboot_target, run_fsck);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue