mirror of
https://github.com/systemd/systemd.git
synced 2025-02-18 21:57:48 +03:00
udevadm-settle: improve logs when we cannot access /run/udev/control
Addresses https://github.com/systemd/systemd/pull/24474#discussion_r959696663.
This commit is contained in:
parent
47190275cf
commit
133ac84e60
@ -217,8 +217,11 @@ int settle_main(int argc, char *argv[], void *userdata) {
|
||||
return log_error_errno(r, "Failed to wait for daemon to reply: %m");
|
||||
} else {
|
||||
/* For non-privileged users, at least check if udevd is running. */
|
||||
if (access("/run/udev/control", F_OK) < 0)
|
||||
return log_error_errno(errno, "udevd is not running.");
|
||||
if (access("/run/udev/control", F_OK) < 0) {
|
||||
if (errno == ENOENT)
|
||||
return log_error_errno(errno, "systemd-udevd is not running.");
|
||||
return log_error_errno(errno, "Failed to check if /run/udev/control exists: %m");
|
||||
}
|
||||
}
|
||||
|
||||
r = sd_event_default(&event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user