diff options
author | Wei Wang <wvw@google.com> | 2017-06-27 22:08:45 -0700 |
---|---|---|
committer | Wei Wang <wvw@google.com> | 2017-07-05 14:49:57 -0700 |
commit | eeab491efd8f456324f88e444f228b1016712e45 (patch) | |
tree | ac3a5db1273c871d2d96aabbc44187b275e87c56 /init/builtins.cpp | |
parent | 6333cd093809cbfb70309eff4710a1152c67ec86 (diff) |
init: Support custom shutdown actions
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.
This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.
Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index 00ffbc3d2..75a8f1972 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -119,7 +119,7 @@ static int reboot_into_recovery(const std::vector<std::string>& options) { LOG(ERROR) << "failed to set bootloader message: " << err; return -1; } - DoReboot(ANDROID_RB_RESTART2, "reboot", "recovery", false); + property_set("sys.powerctl", "reboot,recovery"); return 0; } |