]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgls: add a better error message for missing cgroupfs 2068/head
authorMantas Mikulėnas <grawity@gmail.com>
Mon, 30 Nov 2015 06:48:29 +0000 (08:48 +0200)
committerMantas Mikulėnas <grawity@gmail.com>
Mon, 30 Nov 2015 17:06:43 +0000 (19:06 +0200)
src/cgls/cgls.c

index 01140c73d85c1fc3ed64e938e845a3cdced5379e..e6277a9084d86c10c01394fb384c393e114043a6 100644 (file)
@@ -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;