summaryrefslogtreecommitdiff
path: root/src/cgls/cgls.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-12-01 22:35:16 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-12-02 09:50:00 -0500
commit8b3aa503c171acdb9ec63484a8c50e2680d31e79 (patch)
tree36228a7d30e678c07637c897d39bd6388f8f1ef9 /src/cgls/cgls.c
parentade61d3b488c4c8db841c08fd60d051d44b9977f (diff)
tests: turn check if manager cannot be intialized into macro
We need to check the same thing in multiple tests. Use a shared macro to make it easier to update the list of errnos. Change the errno code for "unitialized cgroup fs" for ENOMEDIUM. Exec format error looks like something more serious. This fixes test-execute invocation in mock.
Diffstat (limited to 'src/cgls/cgls.c')
-rw-r--r--src/cgls/cgls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index e6277a9084..12537ae85b 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -131,7 +131,7 @@ static int get_cgroup_root(char **ret) {
if (!arg_machine) {
r = cg_get_root_path(ret);
- if (r == -ENOEXEC)
+ if (r == -ENOMEDIUM)
return log_error_errno(r, "Failed to get root control group path: No cgroup filesystem mounted on /sys/fs/cgroup");
else if (r < 0)
return log_error_errno(r, "Failed to get root control group path: %m");