summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'init/devices.h')
-rw-r--r--init/devices.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/init/devices.h b/init/devices.h
index 0be660f80..9d39eaace 100644
--- a/init/devices.h
+++ b/init/devices.h
@@ -29,6 +29,7 @@
29#include <selinux/label.h> 29#include <selinux/label.h>
30 30
31#include "uevent.h" 31#include "uevent.h"
32#include "uevent_handler.h"
32 33
33namespace android { 34namespace android {
34namespace init { 35namespace init {
@@ -105,7 +106,7 @@ class Subsystem {
105 std::string dir_name_ = "/dev"; 106 std::string dir_name_ = "/dev";
106}; 107};
107 108
108class DeviceHandler { 109class DeviceHandler : public UeventHandler {
109 public: 110 public:
110 friend class DeviceHandlerTester; 111 friend class DeviceHandlerTester;
111 112
@@ -113,11 +114,12 @@ class DeviceHandler {
113 DeviceHandler(std::vector<Permissions> dev_permissions, 114 DeviceHandler(std::vector<Permissions> dev_permissions,
114 std::vector<SysfsPermissions> sysfs_permissions, std::vector<Subsystem> subsystems, 115 std::vector<SysfsPermissions> sysfs_permissions, std::vector<Subsystem> subsystems,
115 std::set<std::string> boot_devices, bool skip_restorecon); 116 std::set<std::string> boot_devices, bool skip_restorecon);
117 virtual ~DeviceHandler() = default;
116 118
117 void HandleDeviceEvent(const Uevent& uevent); 119 void HandleUevent(const Uevent& uevent) override;
120 void ColdbootDone() override;
118 121
119 std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const; 122 std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const;
120 void set_skip_restorecon(bool value) { skip_restorecon_ = value; }
121 123
122 private: 124 private:
123 bool FindPlatformDevice(std::string path, std::string* platform_device_path) const; 125 bool FindPlatformDevice(std::string path, std::string* platform_device_path) const;