Home
last modified time | relevance | path

Searched refs:uevent (Results 1 – 25 of 62) sorted by relevance

123

/system/core/init/
Duevent_listener.cpp32 static void ParseEvent(const char* msg, Uevent* uevent) { in ParseEvent() argument
33 uevent->partition_num = -1; in ParseEvent()
34 uevent->major = -1; in ParseEvent()
35 uevent->minor = -1; in ParseEvent()
36 uevent->action.clear(); in ParseEvent()
37 uevent->path.clear(); in ParseEvent()
38 uevent->subsystem.clear(); in ParseEvent()
39 uevent->firmware.clear(); in ParseEvent()
40 uevent->partition_name.clear(); in ParseEvent()
41 uevent->device_name.clear(); in ParseEvent()
[all …]
Dblock_dev_initializer.cpp42 auto dm_callback = [this, &dm_path, &found](const Uevent& uevent) { in InitDeviceMapper() argument
43 if (uevent.path == dm_path) { in InitDeviceMapper()
44 device_handler_->HandleUevent(uevent); in InitDeviceMapper()
64 ListenerAction BlockDevInitializer::HandleUevent(const Uevent& uevent, in HandleUevent() argument
67 if (uevent.subsystem != "block") { in HandleUevent()
71 auto name = uevent.partition_name; in HandleUevent()
73 size_t base_idx = uevent.path.rfind('/'); in HandleUevent()
77 name = uevent.path.substr(base_idx + 1); in HandleUevent()
88 device_handler_->HandleUevent(uevent); in HandleUevent()
93 auto uevent_callback = [&, this](const Uevent& uevent) -> ListenerAction { in InitDevices() argument
[all …]
Dfirmware_handler.cpp73 const Uevent& uevent) const { in RunExternalHandler()
94 setenv("FIRMWARE", uevent.firmware.c_str(), 1); in RunExternalHandler()
95 setenv("DEVPATH", uevent.path.c_str(), 1); in RunExternalHandler()
159 std::string FirmwareHandler::GetFirmwarePath(const Uevent& uevent) const { in GetFirmwarePath()
161 if (external_handler.devpath == uevent.path) { in GetFirmwarePath()
163 << "' for devpath: '" << uevent.path << "' firmware: '" << uevent.firmware in GetFirmwarePath()
167 RunExternalHandler(external_handler.handler_path, external_handler.uid, uevent); in GetFirmwarePath()
171 return uevent.firmware; in GetFirmwarePath()
177 return uevent.firmware; in GetFirmwarePath()
179 LOG(INFO) << "Loading firmware '" << *result << "' in place of '" << uevent.firmware in GetFirmwarePath()
[all …]
Ddevices.cpp315 std::vector<std::string> DeviceHandler::GetBlockDeviceSymlinks(const Uevent& uevent) const { in GetBlockDeviceSymlinks()
321 if (FindPlatformDevice(uevent.path, &device)) { in GetBlockDeviceSymlinks()
333 } else if (FindPciDevicePrefix(uevent.path, &device)) { in GetBlockDeviceSymlinks()
335 } else if (FindVbdDevicePrefix(uevent.path, &device)) { in GetBlockDeviceSymlinks()
337 } else if (FindDmDevice(uevent.path, &partition, &uuid)) { in GetBlockDeviceSymlinks()
354 if (!uevent.partition_name.empty()) { in GetBlockDeviceSymlinks()
355 std::string partition_name_sanitized(uevent.partition_name); in GetBlockDeviceSymlinks()
357 if (partition_name_sanitized != uevent.partition_name) { in GetBlockDeviceSymlinks()
358 LOG(VERBOSE) << "Linking partition '" << uevent.partition_name << "' as '" in GetBlockDeviceSymlinks()
369 links.emplace_back("/dev/block/by-name/" + uevent.device_name); in GetBlockDeviceSymlinks()
[all …]
Ddevices_test.cpp32 void TestGetSymlinks(const std::string& platform_device, const Uevent& uevent, in TestGetSymlinks() argument
44 mkdir_recursive(android::base::Dirname(fake_sys_root.path + uevent.path), 0777); in TestGetSymlinks()
47 result = device_handler_.GetBlockDeviceSymlinks(uevent); in TestGetSymlinks()
66 Uevent uevent = { in TEST() local
74 device_handler_tester_.TestGetSymlinks(platform_device, uevent, expected_result); in TEST()
80 Uevent uevent = { in TEST() local
91 device_handler_tester_.TestGetSymlinks(platform_device, uevent, expected_result); in TEST()
96 Uevent uevent = { in TEST() local
106 device_handler_tester_.TestGetSymlinks(platform_device, uevent, expected_result); in TEST()
111 Uevent uevent = { in TEST() local
[all …]
Dmodalias_handler.cpp30 void ModaliasHandler::HandleUevent(const Uevent& uevent) { in HandleUevent() argument
31 if (uevent.modalias.empty()) return; in HandleUevent()
32 modprobe_.LoadWithAliases(uevent.modalias, true); in HandleUevent()
DREADME.ueventd.md14 Sets the uevent socket rcvbuf_size to 16 megabytes.
18 Ueventd listens to the kernel uevent sockets and creates/deletes nodes in `/dev` based on the
23 1. Block devices are created as `/dev/block/<basename uevent DEVPATH>`. There are symlinks created
24 to this node at `/dev/block/<type>/<parent device>/<basename uevent DEVPATH>`,
25 `/dev/block/<type>/<parent device>/by-name/<uevent PARTNAME>`, and `/dev/block/by-name/<uevent
27 2. USB devices are created as `/dev/<uevent DEVNAME>` if `DEVNAME` was specified for the uevent,
28 otherwise as `/dev/bus/usb/<bus_id>/<device_id>` where `bus_id` is `uevent MINOR / 128 + 1` and
29 `device_id` is `uevent MINOR % 128 + 1`.
30 3. All other devices are created as `/dev/<basename uevent DEVPATH>`
50 `subsystem_name` is used to match uevent `SUBSYSTEM` value
[all …]
Ddevices.h93 std::string ParseDevPath(const Uevent& uevent) const { in ParseDevPath() argument
95 ? uevent.device_name in ParseDevPath()
96 : android::base::Basename(uevent.path); in ParseDevPath()
119 void HandleUevent(const Uevent& uevent) override;
122 std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const;
133 void HandleAshmemUevent(const Uevent& uevent);
Dfirmware_handler.h45 void HandleUevent(const Uevent& uevent) override;
52 const Uevent& uevent) const;
53 std::string GetFirmwarePath(const Uevent& uevent) const;
Dueventd.cpp148 auto& uevent = uevent_queue_[i]; in UeventHandlerMain() local
151 uevent_handler->HandleUevent(uevent); in UeventHandlerMain()
186 uevent_listener_.RegenerateUevents([this](const Uevent& uevent) { in RegenerateUevents() argument
187 uevent_queue_.emplace_back(uevent); in RegenerateUevents()
325 uevent_listener.Poll([&uevent_handlers](const Uevent& uevent) { in ueventd_main() argument
327 uevent_handler->HandleUevent(uevent); in ueventd_main()
Dfirmware_handler_test.cpp40 auto uevent = Uevent{ in FirmwareTestWithExternalHandler()
46 EXPECT_EQ("other_firmware001.bin", firmware_handler.GetFirmwarePath(uevent)); in FirmwareTestWithExternalHandler()
48 EXPECT_EQ("test_firmware001.bin", firmware_handler.GetFirmwarePath(uevent)); in FirmwareTestWithExternalHandler()
Duevent_handler.h28 virtual void HandleUevent(const Uevent& uevent) = 0;
Dmodalias_handler.h35 void HandleUevent(const Uevent& uevent) override;
Dblock_dev_initializer.h34 ListenerAction HandleUevent(const Uevent& uevent, std::set<std::string>* devices);
Duevent_listener.h59 ReadUeventResult ReadUevent(Uevent* uevent) const;
/system/sepolicy/prebuilts/api/27.0/private/
Dephemeral_app.te44 # Receive or send uevent messages.
Dsurfaceflinger.te44 # Create and use netlink kobject uevent sockets.
Dgenfs_contexts56 genfscon sysfs /devices/virtual/block/zram0/uevent u:object_r:sysfs_zram_uevent:s0
57 genfscon sysfs /devices/virtual/block/zram1/uevent u:object_r:sysfs_zram_uevent:s0
/system/sepolicy/prebuilts/api/26.0/private/
Dephemeral_app.te42 # Receive or send uevent messages.
Dsurfaceflinger.te45 # Create and use netlink kobject uevent sockets.
/system/sepolicy/prebuilts/api/28.0/private/
Dephemeral_app.te55 # Receive or send uevent messages.
Dsurfaceflinger.te45 # Create and use netlink kobject uevent sockets.
/system/sepolicy/prebuilts/api/29.0/private/
Dsurfaceflinger.te49 # Create and use netlink kobject uevent sockets.
/system/sepolicy/private/
Dephemeral_app.te73 # Receive or send uevent messages.
/system/sepolicy/prebuilts/api/30.0/private/
Dephemeral_app.te73 # Receive or send uevent messages.

123