Merge pull request #319 from teg/udev-cgroup-warning

udevd: suppress warning if we don't find cgroup
This commit is contained in:
Lennart Poettering
2015-06-22 22:32:26 +02:00
+5 -1
View File
@@ -1672,9 +1672,13 @@ int main(int argc, char *argv[]) {
we only do this on systemd systems, and only if we are directly spawned we only do this on systemd systems, and only if we are directly spawned
by PID1. otherwise we are not guaranteed to have a dedicated cgroup */ by PID1. otherwise we are not guaranteed to have a dedicated cgroup */
r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup); r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup);
if (r < 0) if (r < 0) {
if (r == -ENOENT)
log_debug_errno(r, "did not find dedicated cgroup: %m");
else
log_warning_errno(r, "failed to get cgroup: %m"); log_warning_errno(r, "failed to get cgroup: %m");
} }
}
r = listen_fds(&fd_ctrl, &fd_uevent); r = listen_fds(&fd_ctrl, &fd_uevent);
if (r < 0) { if (r < 0) {