diff options
author | Steven Laver <lavers@google.com> | 2019-12-12 15:29:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-12-12 15:29:36 +0000 |
commit | a239544c7b06814b70fd970de7eaac234682fa52 (patch) | |
tree | a4298d61f9b73642f350799b1157e49b65f4e1e8 /init/reboot.cpp | |
parent | 63de1e1c8d7824c241f22de67edf54f4f1eaeea5 (diff) | |
parent | 5319412e5305a3b4bcecf251a2955c09a6e9837e (diff) |
Merge "Merge RP1A.191203.001" into r-keystone-qcom-dev
Diffstat (limited to 'init/reboot.cpp')
-rw-r--r-- | init/reboot.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/init/reboot.cpp b/init/reboot.cpp index 4c662f07c..1614ff610 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -38,6 +38,7 @@ #include <thread> #include <vector> +#include <InitProperties.sysprop.h> #include <android-base/chrono_utils.h> #include <android-base/file.h> #include <android-base/logging.h> @@ -751,8 +752,8 @@ static Result<void> DoUserspaceReboot() { // actions. We should make sure, that all of them are propagated before // proceeding with userspace reboot. Synchronously setting kUserspaceRebootInProgress property // is not perfect, but it should do the trick. - if (property_set(kUserspaceRebootInProgress, "1") != 0) { - return Error() << "Failed to set property " << kUserspaceRebootInProgress; + if (!android::sysprop::InitProperties::userspace_reboot_in_progress(true)) { + return Error() << "Failed to set sys.init.userspace_reboot.in_progress property"; } EnterShutdown(); std::vector<Service*> stop_first; @@ -813,7 +814,7 @@ static Result<void> DoUserspaceReboot() { } static void UserspaceRebootWatchdogThread() { - if (!WaitForProperty("sys.init.userspace_reboot_in_progress", "1", 20s)) { + if (!WaitForProperty("sys.init.userspace_reboot.in_progress", "1", 20s)) { // TODO(b/135984674): should we reboot instead? LOG(WARNING) << "Userspace reboot didn't start in 20 seconds. Stopping watchdog"; return; |