Loading init/builtins.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ using android::fs_mgr::ReadFstabFromFile; namespace android { namespace init { std::vector<std::string> late_import_paths; static constexpr std::chrono::nanoseconds kCommandRetryTimeout = 5s; static Result<void> reboot_into_recovery(const std::vector<std::string>& options) { Loading init/builtins.h +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ class BuiltinFunctionMap : public KeywordFunctionMap { const Map& map() const override; }; extern std::vector<std::string> late_import_paths; } // namespace init } // namespace android Loading init/devices.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -39,10 +39,6 @@ #include "selabel.h" #include "util.h" #ifdef _INIT_INIT_H #error "Do not include init.h in files used by ueventd; it will expose init's globals" #endif using namespace std::chrono_literals; using android::base::Basename; Loading init/init.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -28,9 +28,11 @@ #include <sys/types.h> #include <unistd.h> #include <functional> #include <map> #include <memory> #include <optional> #include <vector> #include <android-base/chrono_utils.h> #include <android-base/file.h> Loading @@ -54,6 +56,7 @@ #include "action_parser.h" #include "boringssl_self_test.h" #include "builtins.h" #include "epoll.h" #include "first_stage_init.h" #include "first_stage_mount.h" Loading Loading @@ -100,8 +103,6 @@ static std::string shutdown_command; static bool do_shutdown = false; static bool load_debug_prop = false; std::vector<std::string> late_import_paths; static std::vector<Subcontext>* subcontexts; void DumpState() { Loading init/init.h +1 −11 Original line number Diff line number Diff line Loading @@ -14,14 +14,11 @@ * limitations under the License. */ #ifndef _INIT_INIT_H #define _INIT_INIT_H #pragma once #include <sys/types.h> #include <functional> #include <string> #include <vector> #include "action.h" #include "action_manager.h" Loading @@ -31,11 +28,6 @@ namespace android { namespace init { // Note: These globals are *only* valid in init, so they should not be used in ueventd // or any files that may be included in ueventd, such as devices.cpp and util.cpp. // TODO: Have an Init class and remove all globals. extern std::vector<std::string> late_import_paths; Parser CreateParser(ActionManager& action_manager, ServiceList& service_list); Parser CreateServiceOnlyParser(ServiceList& service_list); Loading @@ -53,5 +45,3 @@ int SecondStageMain(int argc, char** argv); } // namespace init } // namespace android #endif /* _INIT_INIT_H */ Loading
init/builtins.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ using android::fs_mgr::ReadFstabFromFile; namespace android { namespace init { std::vector<std::string> late_import_paths; static constexpr std::chrono::nanoseconds kCommandRetryTimeout = 5s; static Result<void> reboot_into_recovery(const std::vector<std::string>& options) { Loading
init/builtins.h +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ class BuiltinFunctionMap : public KeywordFunctionMap { const Map& map() const override; }; extern std::vector<std::string> late_import_paths; } // namespace init } // namespace android Loading
init/devices.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -39,10 +39,6 @@ #include "selabel.h" #include "util.h" #ifdef _INIT_INIT_H #error "Do not include init.h in files used by ueventd; it will expose init's globals" #endif using namespace std::chrono_literals; using android::base::Basename; Loading
init/init.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -28,9 +28,11 @@ #include <sys/types.h> #include <unistd.h> #include <functional> #include <map> #include <memory> #include <optional> #include <vector> #include <android-base/chrono_utils.h> #include <android-base/file.h> Loading @@ -54,6 +56,7 @@ #include "action_parser.h" #include "boringssl_self_test.h" #include "builtins.h" #include "epoll.h" #include "first_stage_init.h" #include "first_stage_mount.h" Loading Loading @@ -100,8 +103,6 @@ static std::string shutdown_command; static bool do_shutdown = false; static bool load_debug_prop = false; std::vector<std::string> late_import_paths; static std::vector<Subcontext>* subcontexts; void DumpState() { Loading
init/init.h +1 −11 Original line number Diff line number Diff line Loading @@ -14,14 +14,11 @@ * limitations under the License. */ #ifndef _INIT_INIT_H #define _INIT_INIT_H #pragma once #include <sys/types.h> #include <functional> #include <string> #include <vector> #include "action.h" #include "action_manager.h" Loading @@ -31,11 +28,6 @@ namespace android { namespace init { // Note: These globals are *only* valid in init, so they should not be used in ueventd // or any files that may be included in ueventd, such as devices.cpp and util.cpp. // TODO: Have an Init class and remove all globals. extern std::vector<std::string> late_import_paths; Parser CreateParser(ActionManager& action_manager, ServiceList& service_list); Parser CreateServiceOnlyParser(ServiceList& service_list); Loading @@ -53,5 +45,3 @@ int SecondStageMain(int argc, char** argv); } // namespace init } // namespace android #endif /* _INIT_INIT_H */