Merge "powerctl: add thermal-shutdown command"

This commit is contained in:
Treehugger Robot 2017-03-18 01:50:48 +00:00 committed by Gerrit Code Review
commit 3472c1b130
1 changed files with 3 additions and 0 deletions

View File

@ -718,6 +718,9 @@ static int do_powerctl(const std::vector<std::string>& args) {
} else if (strncmp(command, "reboot", 6) == 0) {
cmd = ANDROID_RB_RESTART2;
len = 6;
} else if (strncmp(command, "thermal-shutdown", 16) == 0) {
cmd = ANDROID_RB_THERMOFF;
len = 16;
} else {
LOG(ERROR) << "powerctl: unrecognized command '" << command << "'";
return -EINVAL;