diff options
author | Tom Cherry <tomcherry@google.com> | 2018-08-03 13:36:18 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-08-03 13:40:17 -0700 |
commit | 44aceed01649353af82bbc5367098b55cf3b5d69 (patch) | |
tree | bb936682d23b6a4b76dfa29ad3608272f427789d /init/reboot_utils.h | |
parent | 132615b8031411aa731fe400ba5a8b21da834560 (diff) | |
download | system_core-44aceed01649353af82bbc5367098b55cf3b5d69.tar.gz system_core-44aceed01649353af82bbc5367098b55cf3b5d69.tar.bz2 system_core-44aceed01649353af82bbc5367098b55cf3b5d69.zip |
Split init's source files init first stage and second stage
This is a baseline for splitting init first and second stage into
their own executables.
Bug: 79758715
Test: sailfish boots
Change-Id: I549ad4502893b3a5e4c2a9886f66850f6d31b619
Diffstat (limited to 'init/reboot_utils.h')
-rw-r--r-- | init/reboot_utils.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/init/reboot_utils.h b/init/reboot_utils.h new file mode 100644 index 000000000..073a16a68 --- /dev/null +++ b/init/reboot_utils.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include <string> + +namespace android { +namespace init { + +// Determines whether the system is capable of rebooting. This is conservative, +// so if any of the attempts to determine this fail, it will still return true. +bool IsRebootCapable(); +// This is a wrapper around the actual reboot calls. +void __attribute__((noreturn)) RebootSystem(unsigned int cmd, const std::string& reboot_target); +void InstallRebootSignalHandlers(); + +} // namespace init +} // namespace android |