summaryrefslogtreecommitdiff
path: root/src/shared/cgroup-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-07 16:03:45 +0200
committerAnthony G. Basile <blueness@gentoo.org>2015-04-12 18:59:02 -0400
commit119711f4e8f7dd47cb9abcdbde0023a4607e2dbf (patch)
treef01bcd016b5d31840d34c4e8bc140d7d6292d0cc /src/shared/cgroup-util.c
parent88113c8b3f914766add73ff7a7976eced1534c14 (diff)
path-util: fix more path_is_mount e792e890f fallout
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/cgroup-util.c')
-rw-r--r--src/shared/cgroup-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index f1dad13656..2076eff4d2 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -205,8 +205,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;