Zbigniew Jędrzejewski-Szmek 2b6823
From 19bc96f7cdda48ca331d5cb0060d3a7eaad59a16 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek 2b6823
From: Lennart Poettering <lennart@poettering.net>
Zbigniew Jędrzejewski-Szmek 2b6823
Date: Tue, 16 Feb 2016 14:03:47 +0100
Zbigniew Jędrzejewski-Szmek 2b6823
Subject: [PATCH] udev: fix cg_unified() return code checking
Zbigniew Jędrzejewski-Szmek 2b6823
Zbigniew Jędrzejewski-Szmek 2b6823
Fixes fall-out from 8b3aa503c171acdb9ec63484a8c50e2680d31e79.
Zbigniew Jędrzejewski-Szmek 2b6823
Zbigniew Jędrzejewski-Szmek 2b6823
Fixes: #2635
Zbigniew Jędrzejewski-Szmek 2b6823
(cherry picked from commit 6d2353394fc33e923d1ab464c8f88df2a5105ffb)
Zbigniew Jędrzejewski-Szmek 2b6823
---
Zbigniew Jędrzejewski-Szmek 2b6823
 src/udev/udevd.c | 2 +-
Zbigniew Jędrzejewski-Szmek 2b6823
 1 file changed, 1 insertion(+), 1 deletion(-)
Zbigniew Jędrzejewski-Szmek 2b6823
Zbigniew Jędrzejewski-Szmek 2b6823
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
Zbigniew Jędrzejewski-Szmek 2b6823
index 2c1c4a967b..bb92f16352 100644
Zbigniew Jędrzejewski-Szmek 2b6823
--- a/src/udev/udevd.c
Zbigniew Jędrzejewski-Szmek 2b6823
+++ b/src/udev/udevd.c
Zbigniew Jędrzejewski-Szmek 2b6823
@@ -1715,7 +1715,7 @@ int main(int argc, char *argv[]) {
Zbigniew Jędrzejewski-Szmek 2b6823
                    by PID1. otherwise we are not guaranteed to have a dedicated cgroup */
Zbigniew Jędrzejewski-Szmek 2b6823
                 r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup);
Zbigniew Jędrzejewski-Szmek 2b6823
                 if (r < 0) {
Zbigniew Jędrzejewski-Szmek 2b6823
-                        if (r == -ENOENT || r == -ENOEXEC)
Zbigniew Jędrzejewski-Szmek 2b6823
+                        if (r == -ENOENT || r == -ENOMEDIUM)
Zbigniew Jędrzejewski-Szmek 2b6823
                                 log_debug_errno(r, "did not find dedicated cgroup: %m");
Zbigniew Jędrzejewski-Szmek 2b6823
                         else
Zbigniew Jędrzejewski-Szmek 2b6823
                                 log_warning_errno(r, "failed to get cgroup: %m");