summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cherry2018-08-01 15:12:20 -0500
committerTom Cherry2018-08-01 15:29:05 -0500
commit457e28f1292bbc1687038dfd15f4779ce3d8fd9e (patch)
treee1c4f3ab62e13ca49f9ee165849f6778146256fb /init/firmware_handler.h
parent081b710b2ee7f726f1bef282333c397006b6b37f (diff)
downloadplatform-system-core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.tar.gz
platform-system-core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.tar.xz
platform-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/firmware_handler.h')
-rw-r--r--init/firmware_handler.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/init/firmware_handler.h b/init/firmware_handler.h
index 6081511b5..399609693 100644
--- a/init/firmware_handler.h
+++ b/init/firmware_handler.h
@@ -21,13 +21,23 @@
21#include <vector> 21#include <vector>
22 22
23#include "uevent.h" 23#include "uevent.h"
24#include "uevent_handler.h"
24 25
25namespace android { 26namespace android {
26namespace init { 27namespace init {
27 28
28extern std::vector<std::string> firmware_directories; 29class FirmwareHandler : public UeventHandler {
30 public:
31 explicit FirmwareHandler(std::vector<std::string> firmware_directories);
32 virtual ~FirmwareHandler() = default;
29 33
30void HandleFirmwareEvent(const Uevent& uevent); 34 void HandleUevent(const Uevent& uevent) override;
35
36 private:
37 void ProcessFirmwareEvent(const Uevent& uevent);
38
39 std::vector<std::string> firmware_directories_;
40};
31 41
32} // namespace init 42} // namespace init
33} // namespace android 43} // namespace android