diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-05-28 17:57:24 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-05-28 17:57:24 +0200 |
commit | c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3 (patch) | |
tree | 10cea79238aaa7329865c8fecc1ea50d3b4409b8 /otautil/sysutil.cpp | |
parent | Merge "Some clean ups to the updater" (diff) | |
parent | recovery: report compliant reboot reason (Part Deux) (diff) | |
download | android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.tar android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.tar.gz android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.tar.bz2 android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.tar.lz android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.tar.xz android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.tar.zst android_bootable_recovery-c0a51a01ce8bf1bac21033b7eebcf63f7a9d9bb3.zip |
Diffstat (limited to 'otautil/sysutil.cpp')
-rw-r--r-- | otautil/sysutil.cpp | 6 |
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) { |