summaryrefslogtreecommitdiffstats
path: root/otautil/sysutil.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2019-05-20 19:36:16 +0200
committerMark Salyzyn <salyzyn@google.com>2019-05-23 22:58:53 +0200
commit488cc05c9685277bfba148ad259bde10bdc4a439 (patch)
treeec6d221f9f9986f70d9df3660972c7c87d70aaf8 /otautil/sysutil.cpp
parentMerge "Move off the Next ZipString overload." (diff)
downloadandroid_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar
android_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar.gz
android_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar.bz2
android_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar.lz
android_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar.xz
android_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar.zst
android_bootable_recovery-488cc05c9685277bfba148ad259bde10bdc4a439.zip
Diffstat (limited to 'otautil/sysutil.cpp')
-rw-r--r--otautil/sysutil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/otautil/sysutil.cpp b/otautil/sysutil.cpp
index 420db4cac..a8829858d 100644
--- a/otautil/sysutil.cpp
+++ b/otautil/sysutil.cpp
@@ -229,9 +229,9 @@ bool Reboot(std::string_view target) {
return android::base::SetProperty(ANDROID_RB_PROPERTY, cmd);
}
-bool Shutdown() {
- // "shutdown" doesn't need a "reason" arg nor a comma.
- return android::base::SetProperty(ANDROID_RB_PROPERTY, "shutdown");
+bool Shutdown(std::string_view target) {
+ std::string cmd = "shutdown," + std::string(target);
+ return android::base::SetProperty(ANDROID_RB_PROPERTY, cmd);
}
std::vector<char*> StringVectorToNullTerminatedArray(const std::vector<std::string>& args) {