summaryrefslogtreecommitdiff
path: root/src/cgls/cgls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgls/cgls.c')
-rw-r--r--src/cgls/cgls.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index 3cdadc8fad..b6b15cf114 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -146,10 +146,9 @@ static int parse_argv(int argc, char *argv[]) {
assert_not_reached("Unhandled option");
}
- if (arg_machine && arg_show_unit != SHOW_UNIT_NONE) {
- log_error("Cannot combine --unit or --user-unit with --machine=.");
- return -EINVAL;
- }
+ if (arg_machine && arg_show_unit != SHOW_UNIT_NONE)
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "Cannot combine --unit or --user-unit with --machine=.");
return 1;
}