Home
last modified time | relevance | path

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

/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 …]
Dfirmware_handler.cpp39 static void LoadFirmware(const Uevent& uevent, const std::string& root, int fw_fd, size_t fw_size, in LoadFirmware() argument
47 PLOG(ERROR) << "firmware: sendfile failed { '" << root << "', '" << uevent.firmware in LoadFirmware()
60 static void ProcessFirmwareEvent(const Uevent& uevent) { in ProcessFirmwareEvent() argument
63 LOG(INFO) << "firmware: loading '" << uevent.firmware << "' for '" << uevent.path << "'"; in ProcessFirmwareEvent()
65 std::string root = "/sys" + uevent.path; in ProcessFirmwareEvent()
71 PLOG(ERROR) << "couldn't open firmware loading fd for " << uevent.firmware; in ProcessFirmwareEvent()
77 PLOG(ERROR) << "couldn't open firmware data fd for " << uevent.firmware; in ProcessFirmwareEvent()
86 std::string file = firmware_dirs[i] + uevent.firmware; in ProcessFirmwareEvent()
90 LoadFirmware(uevent, root, fw_fd, sb.st_size, loading_fd, data_fd); in ProcessFirmwareEvent()
103 LOG(ERROR) << "firmware: could not find firmware for " << uevent.firmware; in ProcessFirmwareEvent()
[all …]
Ddevices.cpp299 std::vector<std::string> DeviceHandler::GetBlockDeviceSymlinks(const Uevent& uevent) const { in GetBlockDeviceSymlinks()
303 if (FindPlatformDevice(uevent.path, &device)) { in GetBlockDeviceSymlinks()
315 } else if (FindPciDevicePrefix(uevent.path, &device)) { in GetBlockDeviceSymlinks()
317 } else if (FindVbdDevicePrefix(uevent.path, &device)) { in GetBlockDeviceSymlinks()
329 if (!uevent.partition_name.empty()) { in GetBlockDeviceSymlinks()
330 std::string partition_name_sanitized(uevent.partition_name); in GetBlockDeviceSymlinks()
332 if (partition_name_sanitized != uevent.partition_name) { in GetBlockDeviceSymlinks()
333 LOG(VERBOSE) << "Linking partition '" << uevent.partition_name << "' as '" in GetBlockDeviceSymlinks()
339 if (uevent.partition_num >= 0) { in GetBlockDeviceSymlinks()
340 links.emplace_back(link_path + "/by-num/p" + std::to_string(uevent.partition_num)); 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, nullptr); 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
92 device_handler_tester_.TestGetSymlinks(platform_device, uevent, expected_result); in TEST()
97 Uevent uevent = { in TEST() local
108 device_handler_tester_.TestGetSymlinks(platform_device, uevent, expected_result); in TEST()
113 Uevent uevent = { in TEST() local
[all …]
Dinit_first_stage.cpp63 virtual ListenerAction UeventCallback(const Uevent& uevent);
96 ListenerAction UeventCallback(const Uevent& uevent) override;
165 auto dm_callback = [this, &dm_path, &found](const Uevent& uevent) { in InitRequiredDevices() argument
166 if (uevent.path == dm_path) { in InitRequiredDevices()
167 device_handler_.HandleDeviceEvent(uevent); in InitRequiredDevices()
186 auto uevent_callback = [this](const Uevent& uevent) { return UeventCallback(uevent); }; in InitRequiredDevices() argument
209 ListenerAction FirstStageMount::UeventCallback(const Uevent& uevent) { in UeventCallback() argument
211 if (uevent.subsystem != "block") { in UeventCallback()
215 if (!uevent.partition_name.empty()) { in UeventCallback()
219 auto iter = required_devices_partition_names_.find(uevent.partition_name); in UeventCallback()
[all …]
Dueventd.cpp133 auto& uevent = uevent_queue_[i]; in UeventHandlerMain() local
134 device_handler_.HandleDeviceEvent(uevent); in UeventHandlerMain()
140 uevent_listener_.RegenerateUevents([this](const Uevent& uevent) { in RegenerateUevents() argument
141 HandleFirmwareEvent(uevent); in RegenerateUevents()
143 uevent_queue_.emplace_back(std::move(uevent)); in RegenerateUevents()
279 uevent_listener.Poll([&device_handler](const Uevent& uevent) { in ueventd_main() argument
280 HandleFirmwareEvent(uevent); in ueventd_main()
281 device_handler.HandleDeviceEvent(uevent); in ueventd_main()
Ddevices.h78 std::string ParseDevPath(const Uevent& uevent) const { in ParseDevPath() argument
80 ? uevent.device_name in ParseDevPath()
81 : android::base::Basename(uevent.path); in ParseDevPath()
109 void HandleDeviceEvent(const Uevent& uevent);
111 std::vector<std::string> GetBlockDeviceSymlinks(const Uevent& uevent) const;
Dfirmware_handler.h25 void HandleFirmwareEvent(const Uevent& uevent);
Duevent_listener.h53 bool ReadUevent(Uevent* uevent) const;
/system/sepolicy/prebuilts/api/26.0/private/
Dephemeral_app.te42 # Receive or send uevent messages.
Dsurfaceflinger.te45 # Create and use netlink kobject uevent sockets.
Dpriv_app.te131 # Receive or send uevent messages.
Dapp_neverallows.te9 # Receive or send uevent messages.
Dsystem_server.te82 # Use netlink uevent sockets.
Dfile_contexts457 /sys/devices/virtual/block/zram\d+/uevent u:object_r:sysfs_zram_uevent:s0
/system/sepolicy/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
Dpriv_app.te122 # Receive or send uevent messages.
Dapp_neverallows.te14 # Receive or send uevent messages.
Dsystem_server.te85 # Use netlink uevent sockets.
/system/core/libcutils/
DAndroid.bp115 "uevent.c",
/system/sepolicy/prebuilts/api/26.0/public/
Ddomain.te568 -ueventd # uevent is granted create for this device, but we still neverallow I/O below
/system/sepolicy/public/
Ddomain.te569 -ueventd # uevent is granted create for this device, but we still neverallow I/O below