diff options
Diffstat (limited to 'src/cgtop/cgtop.c')
-rw-r--r-- | src/cgtop/cgtop.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index eb9ccd0cb0..f27c80120d 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -922,10 +922,9 @@ static int run(int argc, char *argv[]) { arg_count = (mask & CGROUP_MASK_PIDS) ? COUNT_PIDS : COUNT_USERSPACE_PROCESSES; - if (arg_recursive_unset && arg_count == COUNT_PIDS) { - log_error("Non-recursive counting is only supported when counting processes, not tasks. Use -P or -k."); - return -EINVAL; - } + if (arg_recursive_unset && arg_count == COUNT_PIDS) + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), + "Non-recursive counting is only supported when counting processes, not tasks. Use -P or -k."); r = show_cgroup_get_path_and_warn(arg_machine, arg_root, &root); if (r < 0) |