chiark / gitweb /
path-util: fix more path_is_mount e792e890f fallout
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Apr 2015 14:03:45 +0000 (16:03 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:51:56 +0000 (07:51 +0100)
src/shared/cgroup-util.c

index 99d0654..2e2984a 100644 (file)
@@ -486,8 +486,10 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
                 int r;
 
                 r = path_is_mount_point("/sys/fs/cgroup", false);
-                if (r <= 0)
-                        return r < 0 ? r : -ENOENT;
+                if (r < 0)
+                        return r;
+                if (r == 0)
+                        return -ENOENT;
 
                 /* Cache this to save a few stat()s */
                 good = true;