Skip to content

Commit

Permalink
cgls: add a better error message for missing cgroupfs
Browse files Browse the repository at this point in the history
  • Loading branch information
grawity committed Nov 30, 2015
1 parent 3a89c3a commit e97a847
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cgls/cgls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e97a847

Please sign in to comment.