summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2015-11-30 08:48:29 +0200
committerMantas Mikulėnas <grawity@gmail.com>2015-11-30 19:06:43 +0200
commite97a84757f76b9c4c401bbc6fa147e35204b2a1b (patch)
treefc583d9b96e933da9a1f2d101340196c26b19b1c
parent3a89c3a0fcff52d02608da7d4f7d8183d620995b (diff)
cgls: add a better error message for missing cgroupfs
-rw-r--r--src/cgls/cgls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index 01140c73d8..e6277a9084 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -131,7 +131,9 @@ static int get_cgroup_root(char **ret) {
if (!arg_machine) {
r = cg_get_root_path(ret);
- if (r < 0)
+ if (r == -ENOEXEC)
+ 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");
return 0;