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.
This commit is contained in:
parent
b8239b9c50
commit
77102db288
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue