diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-04-02 14:51:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-02 14:54:42 +0200 |
commit | c614711386764dbb2b5bb082f708da02bddb3947 (patch) | |
tree | 973ffe02f7eb335d7b540178fd1cab153ff76581 /src/cgtop | |
parent | boot: use TAKE_PTR() where appropriate (diff) | |
download | systemd-c614711386764dbb2b5bb082f708da02bddb3947.tar.xz systemd-c614711386764dbb2b5bb082f708da02bddb3947.zip |
tree-wide: use SYNTHETIC_ERRNO() where appropriate
Diffstat (limited to 'src/cgtop')
-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) |