From: Zbigniew Jędrzejewski-Szmek Date: Thu, 30 Apr 2020 10:38:36 +0000 (+0200) Subject: systemctl: fix hint when 'systemctl help' is given X-Git-Tag: v246-rc1~439^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77102db288e533050397128da182b081a98211f7;p=thirdparty%2Fsystemd.git systemctl: fix hint when 'systemctl help' is given Not all verbs require unit names, but that is beside the point. We need a verb here, and help is not a valid verb. --- diff --git a/src/shared/verbs.c b/src/shared/verbs.c index 1d23ed48a2b..06d89b47363 100644 --- a/src/shared/verbs.c +++ b/src/shared/verbs.c @@ -68,9 +68,9 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) { /* At the end of the list? */ if (!verbs[i].dispatch) { if (name) - log_error("Unknown operation %s.", name); + log_error("Unknown command verb %s.", name); else - log_error("Requires operation parameter."); + log_error("Command verb required."); return -EINVAL; } diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d319d5d3754..d5dc52853a4 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -5860,7 +5860,8 @@ static int show(int argc, char *argv[], void *userdata) { if (show_mode == SYSTEMCTL_SHOW_HELP && argc <= 1) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "This command expects one or more unit names. Did you mean --help?"); + "'help' command expects one or more unit names.\n" + "(Alternatively, help for systemctl itself may be shown with --help)"); r = acquire_bus(BUS_MANAGER, &bus); if (r < 0)