cgroup-util: laccess() returns negative errno already

This commit is contained in:
Lennart Poettering
2021-11-14 22:30:57 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 12a9f68f06
commit cb3763d57b

View File

@@ -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) {