Home
last modified time | relevance | path

Searched refs:uevent (Results 1 – 25 of 70) 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 …]
Ddevices.cpp324 std::vector<std::string> DeviceHandler::GetBlockDeviceSymlinks(const Uevent& uevent) const { in GetBlockDeviceSymlinks()
330 if (FindPlatformDevice(uevent.path, &device)) { in GetBlockDeviceSymlinks()
342 } else if (FindPciDevicePrefix(uevent.path, &device)) { in GetBlockDeviceSymlinks()
344 } else if (FindVbdDevicePrefix(uevent.path, &device)) { in GetBlockDeviceSymlinks()
346 } else if (FindDmDevice(uevent.path, &partition, &uuid)) { in GetBlockDeviceSymlinks()
363 if (!uevent.partition_name.empty()) { in GetBlockDeviceSymlinks()
364 std::string partition_name_sanitized(uevent.partition_name); in GetBlockDeviceSymlinks()
366 if (partition_name_sanitized != uevent.partition_name) { in GetBlockDeviceSymlinks()
367 LOG(VERBOSE) << "Linking partition '" << uevent.partition_name << "' as '" in GetBlockDeviceSymlinks()
378 links.emplace_back("/dev/block/by-name/" + uevent.device_name); in GetBlockDeviceSymlinks()
[all …]
Dblock_dev_initializer.cpp50 auto dm_callback = [this, &dm_path, &found](const Uevent& uevent) { in InitMiscDevice() argument
51 if (uevent.path == dm_path) { in InitMiscDevice()
52 device_handler_->HandleUevent(uevent); in InitMiscDevice()
72 ListenerAction BlockDevInitializer::HandleUevent(const Uevent& uevent, in HandleUevent() argument
75 if (uevent.subsystem != "block") { in HandleUevent()
79 auto name = uevent.partition_name; in HandleUevent()
81 size_t base_idx = uevent.path.rfind('/'); in HandleUevent()
85 name = uevent.path.substr(base_idx + 1); in HandleUevent()
96 device_handler_->HandleUevent(uevent); in HandleUevent()
101 auto uevent_callback = [&, this](const Uevent& uevent) -> ListenerAction { in InitDevices() argument
[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 …]
Dfirmware_handler.cpp106 const Uevent& uevent) const { in RunExternalHandler()
127 setenv("FIRMWARE", uevent.firmware.c_str(), 1); in RunExternalHandler()
128 setenv("DEVPATH", uevent.path.c_str(), 1); in RunExternalHandler()
192 std::string FirmwareHandler::GetFirmwarePath(const Uevent& uevent) const { in GetFirmwarePath()
194 if (external_handler.match(uevent.path)) { in GetFirmwarePath()
196 << "' for devpath: '" << uevent.path << "' firmware: '" << uevent.firmware in GetFirmwarePath()
200 RunExternalHandler(external_handler.handler_path, external_handler.uid, uevent); in GetFirmwarePath()
204 return uevent.firmware; in GetFirmwarePath()
210 return uevent.firmware; in GetFirmwarePath()
212 LOG(INFO) << "Loading firmware '" << *result << "' in place of '" << uevent.firmware in GetFirmwarePath()
[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.
28 Ueventd listens to the kernel uevent sockets and creates/deletes nodes in `/dev` based on the
33 1. Block devices are created as `/dev/block/<basename uevent DEVPATH>`. There are symlinks created
34 to this node at `/dev/block/<type>/<parent device>/<basename uevent DEVPATH>`,
35 `/dev/block/<type>/<parent device>/by-name/<uevent PARTNAME>`, and `/dev/block/by-name/<uevent
37 2. USB devices are created as `/dev/<uevent DEVNAME>` if `DEVNAME` was specified for the uevent,
38 otherwise as `/dev/bus/usb/<bus_id>/<device_id>` where `bus_id` is `uevent MINOR / 128 + 1` and
39 `device_id` is `uevent MINOR % 128 + 1`.
40 3. All other devices are created as `/dev/<basename uevent DEVPATH>`
60 `subsystem_name` is used to match uevent `SUBSYSTEM` value
[all …]
Ddevices.h94 std::string ParseDevPath(const Uevent& uevent) const { in ParseDevPath() argument
96 ? uevent.device_name in ParseDevPath()
97 : android::base::Basename(uevent.path); in ParseDevPath()
120 void HandleUevent(const Uevent& uevent) override;
123 std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const;
134 void HandleAshmemUevent(const Uevent& uevent);
Dfirmware_handler.h48 void HandleUevent(const Uevent& uevent) override;
55 const Uevent& uevent) const;
56 std::string GetFirmwarePath(const Uevent& uevent) const;
Dueventd.cpp149 auto& uevent = uevent_queue_[i]; in UeventHandlerMain() local
152 uevent_handler->HandleUevent(uevent); in UeventHandlerMain()
187 uevent_listener_.RegenerateUevents([this](const Uevent& uevent) { in RegenerateUevents() argument
188 uevent_queue_.emplace_back(uevent); in RegenerateUevents()
333 uevent_listener.Poll([&uevent_handlers](const Uevent& uevent) { in ueventd_main() argument
335 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.h37 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.
/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/prebuilts/api/31.0/private/
Dephemeral_app.te69 # Receive or send uevent messages.
/system/sepolicy/prebuilts/api/30.0/private/
Dephemeral_app.te73 # Receive or send uevent messages.
/system/sepolicy/private/
Dephemeral_app.te69 # Receive or send uevent messages.

123