summaryrefslogtreecommitdiff
path: root/src/cgtop/cgtop.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-04-03 01:46:54 +0900
committerGitHub <noreply@github.com>2019-04-03 01:46:54 +0900
commit33ca308f388724da9f64aa2a8ca07e2f7bbe4b90 (patch)
treee4c6976dd558a9b5fa699ba927dd0432b10ef42e /src/cgtop/cgtop.c
parent82c604607f30f6ab6bf9e55e88b41e5579983520 (diff)
parent568ee8fc468d139b87ce771098b11aa15086c30f (diff)
downloadsystemd-33ca308f388724da9f64aa2a8ca07e2f7bbe4b90.tar.gz
Merge pull request #12188 from poettering/coccinelle-fixlets
tree-wide: let's run coccinelle again
Diffstat (limited to 'src/cgtop/cgtop.c')
-rw-r--r--src/cgtop/cgtop.c7
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)