]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/cgroup-util.c
path-util: fix more path_is_mount e792e890f fallout
[thirdparty/systemd.git] / src / shared / cgroup-util.c
index 05c3125aec79ca0ba2fafb2c27eb94ec65ccc085..b6fa386e9021a607a387942806230cfcd023ad0e 100644 (file)
@@ -487,8 +487,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;