Merge "ueventd: fix other assorted style nits" into main

This commit is contained in:
Treehugger Robot 2024-08-30 21:31:21 +00:00 committed by Gerrit Code Review
commit 41db2810bc

View file

@ -283,7 +283,7 @@ std::tuple<mode_t, uid_t, gid_t> DeviceHandler::GetDevicePermissions(
void DeviceHandler::MakeDevice(const std::string& path, bool block, int major, int minor,
const std::vector<std::string>& links) const {
auto[mode, uid, gid] = GetDevicePermissions(path, links);
auto [mode, uid, gid] = GetDevicePermissions(path, links);
mode |= (block ? S_IFBLK : S_IFCHR);
std::string secontext;
@ -531,7 +531,7 @@ void DeviceHandler::HandleAshmemUevent(const Uevent& uevent) {
if (!ReadFileToString(boot_id_path, &boot_id)) {
PLOG(ERROR) << "Cannot duplicate ashmem device node. Failed to read " << boot_id_path;
return;
};
}
boot_id = Trim(boot_id);
Uevent dup_ashmem_uevent = uevent;
@ -542,10 +542,10 @@ void DeviceHandler::HandleAshmemUevent(const Uevent& uevent) {
}
void DeviceHandler::HandleUevent(const Uevent& uevent) {
if (uevent.action == "add" || uevent.action == "change" ||
uevent.action == "bind" || uevent.action == "online") {
FixupSysPermissions(uevent.path, uevent.subsystem);
}
if (uevent.action == "add" || uevent.action == "change" || uevent.action == "bind" ||
uevent.action == "online") {
FixupSysPermissions(uevent.path, uevent.subsystem);
}
// if it's not a /dev device, nothing to do
if (uevent.major < 0 || uevent.minor < 0) return;