Loading init/README.ueventd.md +10 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,16 @@ For example uevent_socket_rcvbuf_size 16M Sets the uevent socket rcvbuf_size to 16 megabytes. ## Importing configuration files -------------------------------- Ueventd reads /system/etc/ueventd.rc, all other files are imported via the `import` command, which takes the format of import <path> This command parses an ueventd config file, extending the current configuration. If _path_ is a directory, each file in the directory is parsed as a config file. It is not recursive, nested directories will not be parsed. Imported files are parsed after the current file has been parsed. ## /dev ---- Ueventd listens to the kernel uevent sockets and creates/deletes nodes in `/dev` based on the Loading init/ueventd.cpp +1 −6 Original line number Diff line number Diff line Loading @@ -283,12 +283,7 @@ int ueventd_main(int argc, char** argv) { std::vector<std::unique_ptr<UeventHandler>> uevent_handlers; // Keep the current product name base configuration so we remain backwards compatible and // allow it to override everything. auto hardware = android::base::GetProperty("ro.hardware", ""); auto ueventd_configuration = ParseConfig({"/system/etc/ueventd.rc", "/vendor/ueventd.rc", "/odm/ueventd.rc", "/ueventd." + hardware + ".rc"}); auto ueventd_configuration = ParseConfig("/system/etc/ueventd.rc"); uevent_handlers.emplace_back(std::make_unique<DeviceHandler>( std::move(ueventd_configuration.dev_permissions), Loading init/ueventd_parser.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <android-base/parseint.h> #include "import_parser.h" #include "keyword_map.h" #include "parser.h" Loading Loading @@ -220,10 +221,11 @@ Result<void> SubsystemParser::EndSection() { return {}; } UeventdConfiguration ParseConfig(const std::vector<std::string>& configs) { UeventdConfiguration ParseConfig(const std::string& config) { Parser parser; UeventdConfiguration ueventd_configuration; parser.AddSectionParser("import", std::make_unique<ImportParser>(&parser)); parser.AddSectionParser("subsystem", std::make_unique<SubsystemParser>(&ueventd_configuration.subsystems)); Loading @@ -249,9 +251,7 @@ UeventdConfiguration ParseConfig(const std::vector<std::string>& configs) { std::bind(ParseEnabledDisabledLine, _1, &ueventd_configuration.enable_parallel_restorecon)); for (const auto& config : configs) { parser.ParseConfig(config); } return ueventd_configuration; } Loading init/ueventd_parser.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ struct UeventdConfiguration { bool enable_parallel_restorecon = false; }; UeventdConfiguration ParseConfig(const std::vector<std::string>& configs); UeventdConfiguration ParseConfig(const std::string& config); } // namespace init } // namespace android rootdir/ueventd.rc +4 −0 Original line number Diff line number Diff line import /vendor/ueventd.rc import /odm/ueventd.rc import /ueventd.{ro.hardware}.rc firmware_directories /etc/firmware/ /odm/firmware/ /vendor/firmware/ /firmware/image/ uevent_socket_rcvbuf_size 16M Loading Loading
init/README.ueventd.md +10 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,16 @@ For example uevent_socket_rcvbuf_size 16M Sets the uevent socket rcvbuf_size to 16 megabytes. ## Importing configuration files -------------------------------- Ueventd reads /system/etc/ueventd.rc, all other files are imported via the `import` command, which takes the format of import <path> This command parses an ueventd config file, extending the current configuration. If _path_ is a directory, each file in the directory is parsed as a config file. It is not recursive, nested directories will not be parsed. Imported files are parsed after the current file has been parsed. ## /dev ---- Ueventd listens to the kernel uevent sockets and creates/deletes nodes in `/dev` based on the Loading
init/ueventd.cpp +1 −6 Original line number Diff line number Diff line Loading @@ -283,12 +283,7 @@ int ueventd_main(int argc, char** argv) { std::vector<std::unique_ptr<UeventHandler>> uevent_handlers; // Keep the current product name base configuration so we remain backwards compatible and // allow it to override everything. auto hardware = android::base::GetProperty("ro.hardware", ""); auto ueventd_configuration = ParseConfig({"/system/etc/ueventd.rc", "/vendor/ueventd.rc", "/odm/ueventd.rc", "/ueventd." + hardware + ".rc"}); auto ueventd_configuration = ParseConfig("/system/etc/ueventd.rc"); uevent_handlers.emplace_back(std::make_unique<DeviceHandler>( std::move(ueventd_configuration.dev_permissions), Loading
init/ueventd_parser.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <android-base/parseint.h> #include "import_parser.h" #include "keyword_map.h" #include "parser.h" Loading Loading @@ -220,10 +221,11 @@ Result<void> SubsystemParser::EndSection() { return {}; } UeventdConfiguration ParseConfig(const std::vector<std::string>& configs) { UeventdConfiguration ParseConfig(const std::string& config) { Parser parser; UeventdConfiguration ueventd_configuration; parser.AddSectionParser("import", std::make_unique<ImportParser>(&parser)); parser.AddSectionParser("subsystem", std::make_unique<SubsystemParser>(&ueventd_configuration.subsystems)); Loading @@ -249,9 +251,7 @@ UeventdConfiguration ParseConfig(const std::vector<std::string>& configs) { std::bind(ParseEnabledDisabledLine, _1, &ueventd_configuration.enable_parallel_restorecon)); for (const auto& config : configs) { parser.ParseConfig(config); } return ueventd_configuration; } Loading
init/ueventd_parser.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ struct UeventdConfiguration { bool enable_parallel_restorecon = false; }; UeventdConfiguration ParseConfig(const std::vector<std::string>& configs); UeventdConfiguration ParseConfig(const std::string& config); } // namespace init } // namespace android
rootdir/ueventd.rc +4 −0 Original line number Diff line number Diff line import /vendor/ueventd.rc import /odm/ueventd.rc import /ueventd.{ro.hardware}.rc firmware_directories /etc/firmware/ /odm/firmware/ /vendor/firmware/ /firmware/image/ uevent_socket_rcvbuf_size 16M Loading