1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-18 10:04:04 +03:00

udevadm: merge two log stmts

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-10-28 16:00:13 +02:00
parent 195427cd18
commit db12cf926f

View File

@ -217,11 +217,10 @@ int settle_main(int argc, char *argv[], void *userdata) {
return log_error_errno(r, "Failed to wait for daemon to reply: %m"); return log_error_errno(r, "Failed to wait for daemon to reply: %m");
} else { } else {
/* For non-privileged users, at least check if udevd is running. */ /* For non-privileged users, at least check if udevd is running. */
if (access("/run/udev/control", F_OK) < 0) { if (access("/run/udev/control", F_OK) < 0)
if (errno == ENOENT) return log_error_errno(errno,
return log_error_errno(errno, "systemd-udevd is not running."); errno == ENOENT ? "systemd-udevd is not running." :
return log_error_errno(errno, "Failed to check if /run/udev/control exists: %m"); "Failed to check if /run/udev/control exists: %m");
}
} }
r = sd_event_default(&event); r = sd_event_default(&event);