udev: downgrade log level when running without cgroup

The cgroup path is optional, hence it is not necessary to warn the
failure loudly.

Follow-up for f8371dbd56.

Closes #28469.
This commit is contained in:
Yu Watanabe
2023-07-21 10:00:27 +09:00
parent c0d998248e
commit 01b030c201

View File

@@ -1845,7 +1845,7 @@ static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent) {
r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup);
if (r < 0)
log_warning_errno(r, "Failed to get cgroup, ignoring: %m");
log_debug_errno(r, "Failed to get cgroup, ignoring: %m");
else if (endswith(cgroup, "/udev")) { /* If we are in a subcgroup /udev/ we assume it was delegated to us */
log_debug("Running in delegated subcgroup '%s'.", cgroup);
manager->cgroup = TAKE_PTR(cgroup);