From: Lennart Poettering Date: Sun, 14 Nov 2021 21:30:57 +0000 (+0100) Subject: cgroup-util: laccess() returns negative errno already X-Git-Tag: v250-rc1~251 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cb3763d57ba9a7e89d4accbf0aff074c294d29be;p=thirdparty%2Fsystemd.git cgroup-util: laccess() returns negative errno already --- diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index e5f38c65d04..87f491808b7 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -587,10 +587,7 @@ static int controller_is_v1_accessible(const char *root, const char *controller) * - we can modify the hierarchy. */ cpath = strjoina("/sys/fs/cgroup/", dn, root, root ? "/cgroup.procs" : NULL); - if (laccess(cpath, root ? W_OK : F_OK) < 0) - return -errno; - - return 0; + return laccess(cpath, root ? W_OK : F_OK); } int cg_get_path_and_check(const char *controller, const char *path, const char *suffix, char **fs) {