diff options
author | Tom Cherry <tomcherry@google.com> | 2018-08-01 13:12:20 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-08-01 13:29:05 -0700 |
commit | 457e28f1292bbc1687038dfd15f4779ce3d8fd9e (patch) | |
tree | e1c4f3ab62e13ca49f9ee165849f6778146256fb /init/modalias_handler.h | |
parent | 081b710b2ee7f726f1bef282333c397006b6b37f (diff) | |
download | system_core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.tar.gz system_core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.tar.bz2 system_core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.zip |
ueventd: require opt-in for modalias handling
Some devices have modules.alias and modules.dep for modprobe and other
purposes but do not want to opt into ueventd auto loading their
modules. Therefore we add a flag that can be added to ueventd
configuration files to opt into this behavior.
Bug: 111916071
Bug: 112048758
Test: check that modules are loaded with this opt-in
Test: check that modules are not loaded without this opt-in
Change-Id: Ifb281b273059b4671eea1ca5bc726c9e79f3adfb
Diffstat (limited to 'init/modalias_handler.h')
-rw-r--r-- | init/modalias_handler.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/init/modalias_handler.h b/init/modalias_handler.h index e79da3275..3247c86d4 100644 --- a/init/modalias_handler.h +++ b/init/modalias_handler.h @@ -16,22 +16,23 @@ #pragma once -#include "result.h" -#include "uevent.h" - #include <string> #include <unordered_map> #include <vector> +#include "result.h" +#include "uevent.h" +#include "uevent_handler.h" + namespace android { namespace init { -class ModaliasHandler { +class ModaliasHandler : public UeventHandler { public: ModaliasHandler(); - ~ModaliasHandler(){}; + virtual ~ModaliasHandler() = default; - void HandleModaliasEvent(const Uevent& uevent); + void HandleUevent(const Uevent& uevent) override; private: Result<Success> InsmodWithDeps(const std::string& module_name, const std::string& args); |