mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
systemctl: rename "man" to "help"
This commit is contained in:
parent
145dae7eb3
commit
b43f208f78
@ -633,7 +633,7 @@
|
|||||||
output.</para></listitem>
|
output.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>man [NAME...|PID...]</command></term>
|
<term><command>help [NAME...|PID...]</command></term>
|
||||||
|
|
||||||
<listitem><para>Show manual pages for
|
<listitem><para>Show manual pages for
|
||||||
one or more units, if available. If a
|
one or more units, if available. If a
|
||||||
|
@ -2458,7 +2458,7 @@ static void print_status_info(UnitStatusInfo *i) {
|
|||||||
arg_scope == UNIT_FILE_SYSTEM ? "--system" : "--user");
|
arg_scope == UNIT_FILE_SYSTEM ? "--system" : "--user");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void man_status_info(UnitStatusInfo *i) {
|
static void show_unit_help(UnitStatusInfo *i) {
|
||||||
char **p;
|
char **p;
|
||||||
|
|
||||||
assert(i);
|
assert(i);
|
||||||
@ -3020,8 +3020,8 @@ static int show_one(const char *verb, DBusConnection *bus, const char *path, boo
|
|||||||
r = 0;
|
r = 0;
|
||||||
|
|
||||||
if (!show_properties) {
|
if (!show_properties) {
|
||||||
if (streq(verb, "man"))
|
if (streq(verb, "help"))
|
||||||
man_status_info(&info);
|
show_unit_help(&info);
|
||||||
else
|
else
|
||||||
print_status_info(&info);
|
print_status_info(&info);
|
||||||
}
|
}
|
||||||
@ -4284,7 +4284,7 @@ static int systemctl_help(void) {
|
|||||||
" status [NAME...|PID...] Show runtime status of one or more units\n"
|
" status [NAME...|PID...] Show runtime status of one or more units\n"
|
||||||
" show [NAME...|JOB...] Show properties of one or more\n"
|
" show [NAME...|JOB...] Show properties of one or more\n"
|
||||||
" units/jobs or the manager\n"
|
" units/jobs or the manager\n"
|
||||||
" man [NAME...|PID...] Show manual for one or more units\n"
|
" help [NAME...|PID...] Show manual for one or more units\n"
|
||||||
" reset-failed [NAME...] Reset failed state for all, one, or more\n"
|
" reset-failed [NAME...] Reset failed state for all, one, or more\n"
|
||||||
" units\n"
|
" units\n"
|
||||||
" load [NAME...] Load one or more units\n\n"
|
" load [NAME...] Load one or more units\n\n"
|
||||||
@ -5248,7 +5248,7 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
|
|||||||
{ "check", MORE, 2, check_unit },
|
{ "check", MORE, 2, check_unit },
|
||||||
{ "show", MORE, 1, show },
|
{ "show", MORE, 1, show },
|
||||||
{ "status", MORE, 2, show },
|
{ "status", MORE, 2, show },
|
||||||
{ "man", MORE, 2, show },
|
{ "help", MORE, 2, show },
|
||||||
{ "dump", EQUAL, 1, dump },
|
{ "dump", EQUAL, 1, dump },
|
||||||
{ "dot", EQUAL, 1, dot },
|
{ "dot", EQUAL, 1, dot },
|
||||||
{ "snapshot", LESS, 2, snapshot },
|
{ "snapshot", LESS, 2, snapshot },
|
||||||
@ -5293,9 +5293,10 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
|
|||||||
/* Special rule: no arguments means "list-units" */
|
/* Special rule: no arguments means "list-units" */
|
||||||
i = 0;
|
i = 0;
|
||||||
else {
|
else {
|
||||||
if (streq(argv[optind], "help")) {
|
if (streq(argv[optind], "help") && !argv[optind+1]) {
|
||||||
systemctl_help();
|
log_error("This command expects one or more "
|
||||||
return 0;
|
"unit names. Did you mean --help?");
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ELEMENTSOF(verbs); i++)
|
for (i = 0; i < ELEMENTSOF(verbs); i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user