summaryrefslogtreecommitdiffstats
path: root/otautil/sysutil.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2019-05-23 10:09:20 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-05-23 10:09:20 +0200
commit7c151865d69854b60d60829a79fc0424f0814755 (patch)
tree7bf1822b27299a1492ea4fbc30b800c037afd162 /otautil/sysutil.cpp
parentMerge "recovery: report compliant reboot reason" am: d31fb2e7fc am: c3042973a4 (diff)
parentMerge "Revert "recovery: report compliant reboot reason"" am: 44f6b182dd (diff)
downloadandroid_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.tar
android_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.tar.gz
android_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.tar.bz2
android_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.tar.lz
android_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.tar.xz
android_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.tar.zst
android_bootable_recovery-7c151865d69854b60d60829a79fc0424f0814755.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 a8829858d..420db4cac 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(std::string_view target) {
- std::string cmd = "shutdown," + std::string(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");
}
std::vector<char*> StringVectorToNullTerminatedArray(const std::vector<std::string>& args) {