Commit e44bb5e6 authored by Jiří Klimeš's avatar Jiří Klimeš

cli: add 'help' for second level commands (bgo #698237) (rh #1034119)

In addition to 'nmcli connection help', you can now use:
nmcli con up help
nmcli con down help
nmcli dev wifi help
etc.

The help option can also be in the form of --help/-h, or even shortened.

https://bugzilla.gnome.org/show_bug.cgi?id=698237
https://bugzilla.redhat.com/show_bug.cgi?id=1034119
parent a0e7926d
......@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2010 - 2013 Red Hat, Inc.
* (C) Copyright 2010 - 2014 Red Hat, Inc.
*/
#include "config.h"
......@@ -252,102 +252,218 @@ static void
usage (void)
{
fprintf (stderr,
_("Usage: nmcli connection { COMMAND | help }\n"
" COMMAND := { show | up | down | add | modify | edit | delete | reload | load }\n\n"
" show configured [[ id | uuid | path ] <ID>]\n\n"
" show active [[ id | uuid | path | apath ] <ID>]\n\n"
_("Usage: nmcli connection { COMMAND | help }\n\n"
"COMMAND := { show | up | down | add | modify | edit | delete | reload | load }\n\n"
" show configured [[id | uuid | path] <ID>]\n"
" show active [[id | uuid | path | apath] <ID>]\n\n"
#if WITH_WIMAX
" up [[ id | uuid | path ] <ID>] [ifname <ifname>] [ap <BSSID>] [nsp <name>]\n\n"
" up [[id | uuid | path] <ID>] [ifname <ifname>] [ap <BSSID>] [nsp <name>]\n\n"
#else
" up [[ id | uuid | path ] <ID>] [ifname <ifname>] [ap <BSSID>]\n\n"
" up [[id | uuid | path] <ID>] [ifname <ifname>] [ap <BSSID>]\n\n"
#endif
" down [ id | uuid | path | apath ] <ID>\n\n"
" add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS\n\n"
" modify [ id | uuid | path ] <ID> <setting>.<property> <value>\n\n"
" edit [ id | uuid | path ] <ID> | [type <new_con_type>] [con-name <new_con_name>]\n\n"
" delete [ id | uuid | path ] <ID>\n\n"
" reload\n\n"
" load <filename> [ <filename>... ]\n\n\n"
));
" down [id | uuid | path | apath] <ID>\n\n"
" add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS\n\n"
" modify [id | uuid | path] <ID> <setting>.<property> <value>\n\n"
" edit [id | uuid | path] <ID>\n"
" edit [type <new_con_type>] [con-name <new_con_name>]\n\n"
" delete [id | uuid | path] <ID>\n\n"
" reload\n\n"
" load <filename> [ <filename>... ]\n\n"));
}
static void
usage_connection_show (void)
{
fprintf (stderr,
_("Usage: nmcli connection show { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := active [[id | uuid | path | apath] <ID>]\n"
"\n"
"Show connections which are currently used by a device to connect to a network.\n"
"Without a parameter, all active connections are listed. When <ID> is provided,\n"
"the connection details are displayed instead.\n"
"\n"
"ARGUMENTS := configured [[id | uuid | path] <ID>]\n"
"\n"
"Show in-memory and on-disk connections, some of which may also be active if\n"
"a device is using that connection profile. Without a parameter, all profiles\n"
"are listed. When <ID> is provided, the profile details are displayed instead.\n\n"));
}
static void
usage_connection_up (void)
{
fprintf (stderr,
_("Usage: nmcli connection up { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := [id | uuid | path] <ID> [ifname <ifname>] [ap <BSSID>] [nsp <name>]\n"
"\n"
"Activate a connection on a device. The profile to activate is identified by its\n"
"name, UUID or D-Bus path.\n"
"\n"
"ARGUMENTS := ifname <ifname> [ap <BSSID>] [nsp <name>]\n"
"\n"
"Activate a device with a connection. The connection profile is selected\n"
"automatically by NetworkManager.\n"
"\n"
"ifname - specifies the device to active the connection on\n"
"ap - specifies AP to connect to (only valid for Wi-Fi)\n"
"nsp - specifies NSP to connect to (only valid for WiMAX)\n\n"));
}
static void
usage_connection_down (void)
{
fprintf (stderr,
_("Usage: nmcli connection down { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := [id | uuid | path | apath] <ID>\n"
"\n"
"Deactivate a connection from a device (without preventing the device from\n"
"further auto-activation). The profile to deactivate is identified by its name,\n"
"UUID or D-Bus path.\n\n"));
}
static void
usage_connection_add (void)
{
fprintf (stderr,
_("Usage: nmcli connection add { OPTIONS | help }\n"
" OPTIONS := COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS\n\n"
" COMMON_OPTIONS:\n"
" type <type>\n"
" ifname <interface name> | \"*\"\n"
" [con-name <connection name>]\n"
" [autoconnect yes|no]\n\n"
" TYPE_SPECIFIC_OPTIONS:\n"
" ethernet: [mac <MAC address>]\n"
" [cloned-mac <cloned MAC address>]\n"
" [mtu <MTU>]\n\n"
" wifi: ssid <SSID>\n"
" [mac <MAC address>]\n"
" [cloned-mac <cloned MAC address>]\n"
" [mtu <MTU>]\n\n"
" wimax: [mac <MAC address>]\n"
" [nsp <NSP>]\n\n"
" pppoe: username <PPPoE username>\n"
" [password <PPPoE password>]\n"
" [service <PPPoE service name>]\n"
" [mtu <MTU>]\n"
" [mac <MAC address>]\n\n"
" gsm: apn <APN>\n"
" [user <username>]\n"
" [password <password>]\n\n"
" cdma: [user <username>]\n"
" [password <password>]\n\n"
" infiniband: [mac <MAC address>]\n"
" [mtu <MTU>]\n"
" [transport-mode datagram | connected]\n"
" [parent <ifname>]\n"
" [p-key <IPoIB P_Key>]\n\n"
" bluetooth: [addr <bluetooth address>]\n"
" [bt-type panu|dun-gsm|dun-cdma]\n\n"
" vlan: dev <parent device (connection UUID, ifname, or MAC)>\n"
" id <VLAN ID>\n"
" [flags <VLAN flags>]\n"
" [ingress <ingress priority mapping>]\n"
" [egress <egress priority mapping>]\n"
" [mtu <MTU>]\n\n"
" bond: [mode balance-rr (0) | active-backup (1) | balance-xor (2) | broadcast (3) |\n"
" 802.3ad (4) | balance-tlb (5) | balance-alb (6)]\n"
" [primary <ifname>]\n"
" [miimon <num>]\n"
" [downdelay <num>]\n"
" [updelay <num>]\n"
" [arp-interval <num>]\n"
" [arp-ip-target <num>]\n\n"
" bond-slave: master <master (ifname or connection UUID)>\n\n"
" team: [config <file>|<raw JSON data>]\n\n"
" team-slave: master <master (ifname or connection UUID)>\n"
" [config <file>|<raw JSON data>]\n\n"
" bridge: [stp yes|no]\n"
" [priority <num>]\n"
" [forward-delay <2-30>]\n"
" [hello-time <1-10>]\n"
" [max-age <6-40>]\n"
" [ageing-time <0-1000000>]\n\n"
" bridge-slave: master <master (ifname or connection UUID)>\n"
" [priority <0-63>]\n"
" [path-cost <1-65535>]\n"
" [hairpin yes|no]\n\n"
" vpn: vpn-type vpnc|openvpn|pptp|openconnect|openswan\n"
" [user <username>]\n\n"
" olpc-mesh: ssid <SSID>\n"
" [channel <1-13>]\n"
" [dhcp-anycast <MAC address>]\n\n"
" IP_OPTIONS:\n"
" [ip4 <IPv4 address>] [gw4 <IPv4 gateway>]\n"
" [ip6 <IPv6 address>] [gw6 <IPv6 gateway>]\n"
));
_("Usage: nmcli connection add { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS IP_OPTIONS\n\n"
" COMMON_OPTIONS:\n"
" type <type>\n"
" ifname <interface name> | \"*\"\n"
" [con-name <connection name>]\n"
" [autoconnect yes|no]\n\n"
" TYPE_SPECIFIC_OPTIONS:\n"
" ethernet: [mac <MAC address>]\n"
" [cloned-mac <cloned MAC address>]\n"
" [mtu <MTU>]\n\n"
" wifi: ssid <SSID>\n"
" [mac <MAC address>]\n"
" [cloned-mac <cloned MAC address>]\n"
" [mtu <MTU>]\n\n"
" wimax: [mac <MAC address>]\n"
" [nsp <NSP>]\n\n"
" pppoe: username <PPPoE username>\n"
" [password <PPPoE password>]\n"
" [service <PPPoE service name>]\n"
" [mtu <MTU>]\n"
" [mac <MAC address>]\n\n"
" gsm: apn <APN>\n"
" [user <username>]\n"
" [password <password>]\n\n"
" cdma: [user <username>]\n"
" [password <password>]\n\n"
" infiniband: [mac <MAC address>]\n"
" [mtu <MTU>]\n"
" [transport-mode datagram | connected]\n"
" [parent <ifname>]\n"
" [p-key <IPoIB P_Key>]\n\n"
" bluetooth: [addr <bluetooth address>]\n"
" [bt-type panu|dun-gsm|dun-cdma]\n\n"
" vlan: dev <parent device (connection UUID, ifname, or MAC)>\n"
" id <VLAN ID>\n"
" [flags <VLAN flags>]\n"
" [ingress <ingress priority mapping>]\n"
" [egress <egress priority mapping>]\n"
" [mtu <MTU>]\n\n"
" bond: [mode balance-rr (0) | active-backup (1) | balance-xor (2) | broadcast (3) |\n"
" 802.3ad (4) | balance-tlb (5) | balance-alb (6)]\n"
" [primary <ifname>]\n"
" [miimon <num>]\n"
" [downdelay <num>]\n"
" [updelay <num>]\n"
" [arp-interval <num>]\n"
" [arp-ip-target <num>]\n\n"
" bond-slave: master <master (ifname or connection UUID)>\n\n"
" team: [config <file>|<raw JSON data>]\n\n"
" team-slave: master <master (ifname or connection UUID)>\n"
" [config <file>|<raw JSON data>]\n\n"
" bridge: [stp yes|no]\n"
" [priority <num>]\n"
" [forward-delay <2-30>]\n"
" [hello-time <1-10>]\n"
" [max-age <6-40>]\n"
" [ageing-time <0-1000000>]\n\n"
" bridge-slave: master <master (ifname or connection UUID)>\n"
" [priority <0-63>]\n"
" [path-cost <1-65535>]\n"
" [hairpin yes|no]\n\n"
" vpn: vpn-type vpnc|openvpn|pptp|openconnect|openswan\n"
" [user <username>]\n\n"
" olpc-mesh: ssid <SSID>\n"
" [channel <1-13>]\n"
" [dhcp-anycast <MAC address>]\n\n"
" IP_OPTIONS:\n"
" [ip4 <IPv4 address>] [gw4 <IPv4 gateway>]\n"
" [ip6 <IPv6 address>] [gw6 <IPv6 gateway>]\n\n"));
}
static void
usage_connection_modify (void)
{
fprintf (stderr,
_("Usage: nmcli connection modify { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := [id | uuid | path] <ID> <setting name>.<property name> [<value>]\n"
"\n"
"Modify a single property in the connection profile.\n"
"The profile is identified by its name, UUID or D-Bus path.\n\n"));
}
static void
usage_connection_edit (void)
{
fprintf (stderr,
_("Usage: nmcli connection edit { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := [id | uuid | path] <ID>\n"
"\n"
"Edit an existing connection profile in an interactive editor.\n"
"The profile is identified by its name, UUID or D-Bus path\n"
"\n"
"ARGUMENTS := [type <new connection type>] [con-name <new connection name>]\n"
"\n"
"Add a new connection profile in an interactive editor.\n\n"));
}
static void
usage_connection_delete (void)
{
fprintf (stderr,
_("Usage: nmcli connection delete { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := [id | uuid | path] <ID>\n"
"\n"
"Delete a connection profile.\n"
"The profile is identified by its name, UUID or D-Bus path.\n\n"));
}
static void
usage_connection_reload (void)
{
fprintf (stderr,
_("Usage: nmcli connection reload { help }\n"
"\n"
"Reload all connection files from disk.\n\n"));
}
static void
usage_connection_load (void)
{
fprintf (stderr,
_("Usage: nmcli connection load { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := <filename> [<filename>...]\n"
"\n"
"Load/reload one or more connection files from disk. Use this after manually\n"
"editing a connection file to ensure that NetworkManager is aware of its latest\n"
"state.\n\n"));
}
/* The real commands that do something - i.e. not 'help', etc. */
static const char *real_con_commands[] = {
"show",
......@@ -7722,9 +7838,13 @@ parse_cmd (NmCli *nmc, int argc, char **argv)
} else {
if (nmc_arg_is_help (*argv)) {
usage ();
nmc->should_wait = FALSE;
goto usage_exit;
}
else if (matches (*argv, "show") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_show ();
goto usage_exit;
}
arg_ret = next_arg (&argc, &argv);
if (arg_ret != 0 || matches (*argv, "configured") == 0) {
next_arg (&argc, &argv);
......@@ -7740,19 +7860,31 @@ parse_cmd (NmCli *nmc, int argc, char **argv)
}
}
else if (matches(*argv, "up") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_up ();
goto usage_exit;
}
nmc->return_value = do_connection_up (nmc, argc-1, argv+1);
}
else if (matches(*argv, "down") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_down ();
goto usage_exit;
}
nmc->return_value = do_connection_down (nmc, argc-1, argv+1);
}
else if (matches(*argv, "add") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_add ();
nmc->should_wait = FALSE;
} else
nmc->return_value = do_connection_add (nmc, argc-1, argv+1);
goto usage_exit;
}
nmc->return_value = do_connection_add (nmc, argc-1, argv+1);
}
else if (matches(*argv, "edit") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_edit ();
goto usage_exit;
}
editor_thread_data.nmc = nmc;
editor_thread_data.argc = argc - 1;
editor_thread_data.argv = argv + 1;
......@@ -7760,15 +7892,31 @@ parse_cmd (NmCli *nmc, int argc, char **argv)
g_thread_unref (editor_thread);
}
else if (matches(*argv, "delete") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_delete ();
goto usage_exit;
}
nmc->return_value = do_connection_delete (nmc, argc-1, argv+1);
}
else if (matches(*argv, "reload") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_reload ();
goto usage_exit;
}
nmc->return_value = do_connection_reload (nmc, argc-1, argv+1);
}
else if (matches(*argv, "load") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_load ();
goto usage_exit;
}
nmc->return_value = do_connection_load (nmc, argc-1, argv+1);
}
else if (matches (*argv, "modify") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_connection_modify ();
goto usage_exit;
}
nmc->return_value = do_connection_modify (nmc, argc-1, argv+1);
}
else {
......@@ -7781,6 +7929,10 @@ parse_cmd (NmCli *nmc, int argc, char **argv)
return nmc->return_value;
usage_exit:
nmc->should_wait = FALSE;
return nmc->return_value;
opt_error:
g_string_printf (nmc->return_text, _("Error: %s."), error->message);
nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
......
......@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2010 - 2013 Red Hat, Inc.
* (C) Copyright 2010 - 2014 Red Hat, Inc.
*/
#include "config.h"
......@@ -273,24 +273,127 @@ usage (void)
fprintf (stderr,
_("Usage: nmcli device { COMMAND | help }\n\n"
#if WITH_WIMAX
" COMMAND := { status | show | connect | disconnect | wifi | wimax }\n\n"
"COMMAND := { status | show | connect | disconnect | wifi | wimax }\n\n"
#else
" COMMAND := { status | show | connect | disconnect | wifi }\n\n"
"COMMAND := { status | show | connect | disconnect | wifi }\n\n"
#endif
" status\n\n"
" show [<ifname>]\n\n"
" connect <ifname>\n\n"
" disconnect <ifname>\n\n"
" wifi [list [ifname <ifname>] [bssid <BSSID>]]\n\n"
" wifi connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [ifname <ifname>] [bssid <BSSID>] [name <name>]\n\n"
" [private yes|no]\n\n"
" wifi rescan [[ifname] <ifname>]\n\n"
" status\n\n"
" show [<ifname>]\n\n"
" connect <ifname>\n\n"
" disconnect <ifname>\n\n"
" wifi [list [ifname <ifname>] [bssid <BSSID>]]\n\n"
" wifi connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [ifname <ifname>]\n"
" [bssid <BSSID>] [name <name>] [private yes|no]\n\n"
" wifi rescan [[ifname] <ifname>]\n\n"
#if WITH_WIMAX
" wimax [list [ifname <ifname>] [nsp <name>]]\n\n"
" wimax [list [ifname <ifname>] [nsp <name>]]\n\n"
#endif
));
}
static void
usage_device_status (void)
{
fprintf (stderr,
_("Usage: nmcli device status { help }\n"
"\n"
"Show status for all devices.\n"
"By default, the following columns are shown:\n"
" DEVICE - interface name\n"
" TYPE - device type\n"
" STATE - device state\n"
" CONNECTION - connection activated on device (if any)\n"
"Displayed columns can be changed using '--fields' global option. 'status' is\n"
"the default command, which means 'nmcli device' calls 'nmcli device status'.\n\n"));
}
static void
usage_device_show (void)
{
fprintf (stderr,
_("Usage: nmcli device show { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := [<ifname>]\n"
"\n"
"Show details of device(s).\n"
"The command lists details for all devices, or for a given device.\n\n"));
}
static void
usage_device_connect (void)
{
fprintf (stderr,
_("Usage: nmcli device connect { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := <ifname>\n"
"\n"
"Connect the device.\n"
"NetworkManager will try to find a suitable connection that will be activated.\n"
"It will also consider connections that are not set to auto-connect.\n\n"));
}
static void
usage_device_disconnect (void)
{
fprintf (stderr,
_("Usage: nmcli device disconnect { ARGUMENTS | help }\n"
"\n"
"ARGUMENTS := <ifname>\n"
"\n"
"Disconnect the device.\n"
"The command disconnects the device and prevents it from auto-activating\n"
"further connections without user/manual intervention.\n\n"));
}
static void
usage_device_wifi (void)
{
fprintf (stderr,
_("Usage: nmcli device wifi { ARGUMENTS | help }\n"
"\n"
"Perform operation on Wi-Fi devices.\n"
"\n"
"ARGUMENTS := [list [ifname <ifname>] [bssid <BSSID>]]\n"
"\n"
"List available Wi-Fi access points. The 'ifname' and 'bssid' options can be\n"
"used to list APs for a particular interface, or with a specific BSSID.\n"
"\n"
"ARGUMENTS := connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [ifname <ifname>]\n"
" [bssid <BSSID>] [name <name>] [private yes|no]\n"
"\n"
"Connect to a Wi-Fi network specified by SSID or BSSID. The command creates\n"
"a new connection and then activates it on a device. This is a command-line\n"
"counterpart of clicking an SSID in a GUI client. The command always creates\n"
"a new connection and thus it is mainly useful for connecting to new Wi-Fi\n"
"networks. If a connection for the network already exists, it is better to\n"
"bring up the existing profile as follows: nmcli con up id <name>. Note that\n"
"only open, WEP and WPA-PSK networks are supported at the moment. It is also\n"
"assumed that IP configuration is obtained via DHCP.\n"
"\n"
"ARGUMENTS := rescan [[ifname] <ifname>]\n"
"\n"
"Request that NetworkManager immediately re-scan for available access points.\n"
"NetworkManager scans Wi-Fi networks periodically, but in some cases it might\n"
"be useful to start scanning manually. Note that this command does not show\n"
"the APs, use 'nmcli device wifi list' for that.\n\n"));
}
#if WITH_WIMAX
static void
usage_device_wimax (void)
{
fprintf (stderr,
_("Usage: nmcli device wimax { ARGUMENTS | help }\n"
"\n"
"Perform operation on WiMAX devices.\n"
"\n"
"ARGUMENTS := [list [ifname <ifname>] [nsp <name>]]\n"
"\n"
"List available WiMAX NSPs. The 'ifname' and 'nsp' options can be used to\n"
"list networks for a particular interface, or with a specific NSP.\n\n"));
}
#endif
/* quit main loop */
static void
quit (void)
......@@ -2454,30 +2557,55 @@ do_devices (NmCli *nmc, int argc, char **argv)
if (argc > 0) {
if (nmc_arg_is_help (*argv)) {
usage ();
goto usage_exit;
}
else if (matches (*argv, "status") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_device_status ();
goto usage_exit;
}
if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error))
goto opt_error;
nmc->return_value = do_devices_status (nmc, argc-1, argv+1);
}
else if (matches (*argv, "show") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_device_show ();
goto usage_exit;
}
if (!nmc->mode_specified)
nmc->multiline_output = TRUE; /* multiline mode is default for 'device show' */
nmc->return_value = do_devices_show (nmc, argc-1, argv+1);
}
else if (matches (*argv, "connect") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_device_connect ();
goto usage_exit;
}
nmc->return_value = do_device_connect (nmc, argc-1, argv+1);
}
else if (matches (*argv, "disconnect") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_device_disconnect ();
goto usage_exit;
}
nmc->return_value = do_device_disconnect (nmc, argc-1, argv+1);
}
else if (matches (*argv, "wifi") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_device_wifi ();
goto usage_exit;
}
if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error))
goto opt_error;
nmc->return_value = do_device_wifi (nmc, argc-1, argv+1);
}
#if WITH_WIMAX
else if (matches (*argv, "wimax") == 0) {
if (nmc_arg_is_help (*(argv+1))) {
usage_device_wimax ();
goto usage_exit;
}
if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error))
goto opt_error;
nmc->return_value = do_device_wimax (nmc, argc-1, argv+1);
......@@ -2490,6 +2618,7 @@ do_devices (NmCli *nmc, int argc, char **argv)
}
}
usage_exit:
return nmc->return_value;
opt_error:
......
......@@ -14,7 +14,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2010 - 2013 Red Hat, Inc.
* (C) Copyright 2010 - 2014 Red Hat, Inc.
*/
#include "config.h"
......@@ -93,12 +93,57 @@ usage_general (void)
{
fprintf (stderr,
_("Usage: nmcli general { COMMAND | help }\n\n"
" COMMAND := { status | hostname | permissions | logging }\n\n"
" status\n\n"
" hostname [<hostname>]\n\n"
" permissions\n\n"
" logging [level <log level>] [domains <log domains>]\n\n"
));
"COMMAND := { status | hostname | permissions | logging }\n\n"
" status\n\n"
" hostname [<hostname>]\n\n"
" permissions\n\n"
" logging [level <log level>] [domains <log domains>]\n\n"));
}
static void
usage_general_status (void)
{
fprintf (stderr,
_("Usage: nmcli general status { help }\n"