1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-03 01:17:45 +03:00

Merge pull request #25282 from keszybz/trivial-cleanups

Trivial cleanups
This commit is contained in:
Yu Watanabe 2022-11-08 00:21:40 +09:00 committed by GitHub
commit 6c826ed161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

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");
} else {
/* For non-privileged users, at least check if udevd is 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");
}
if (access("/run/udev/control", F_OK) < 0)
return log_error_errno(errno,
errno == ENOENT ? "systemd-udevd is not running." :
"Failed to check if /run/udev/control exists: %m");
}
r = sd_event_default(&event);