diff options
Diffstat (limited to 'clients')
| -rw-r--r-- | clients/cli/agent.c | 8 | ||||
| -rw-r--r-- | clients/cli/devices.c | 4 | ||||
| -rw-r--r-- | clients/cli/nmcli.c | 18 | ||||
| -rw-r--r-- | clients/common/nm-client-utils.c | 5 | ||||
| -rw-r--r-- | clients/common/nm-meta-setting-desc.c | 14 | ||||
| -rw-r--r-- | clients/common/settings-docs.c | 2 | ||||
| -rw-r--r-- | clients/common/settings-docs.c.in | 2 |
7 files changed, 33 insertions, 20 deletions
diff --git a/clients/cli/agent.c b/clients/cli/agent.c index 656a5851..488b16f4 100644 --- a/clients/cli/agent.c +++ b/clients/cli/agent.c @@ -201,10 +201,16 @@ do_agent_all (NmCli *nmc, int argc, char **argv) /* Run both secret and polkit agent */ secret_res = do_agent_secret (nmc, argc, argv); - if (secret_res != NMC_RESULT_SUCCESS) + if (secret_res != NMC_RESULT_SUCCESS) { g_printerr ("%s\n", nmc->return_text->str); + g_string_truncate (nmc->return_text, 0); + } nmc->return_value = do_agent_polkit (nmc, argc, argv); + if (nmc->return_value != NMC_RESULT_SUCCESS) { + g_printerr ("%s\n", nmc->return_text->str); + g_string_truncate (nmc->return_text, 0); + } if (nmc->return_value == NMC_RESULT_SUCCESS && secret_res != NMC_RESULT_SUCCESS) nmc->return_value = secret_res; diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 467ce427..da969fbe 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1116,8 +1116,8 @@ show_device_info (NMDevice *device, NmCli *nmc) (const NMMetaAbstractInfo *const*) nmc_fields_dev_show_general, FALSE, NULL, NULL); - row = g_new0 (NmcOutputField, _NM_META_SETTING_TYPE_NUM + 1); - for (i = 0; i < _NM_META_SETTING_TYPE_NUM; i++) + row = g_new0 (NmcOutputField, G_N_ELEMENTS (nmc_fields_dev_show_general)); + for (i = 0; i < G_N_ELEMENTS (nmc_fields_dev_show_general); i++) row[i].info = (const NMMetaAbstractInfo *) &nmc_fields_dev_show_general[i]; print_required_fields (&nmc->nmc_config, NMC_OF_FLAG_MAIN_HEADER_ONLY, diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index ee621ca3..f5a66cdd 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -454,15 +454,16 @@ signal_handler (gpointer user_data) if (nmc_get_in_readline ()) { nmcli_sigint = TRUE; } else { - g_print (_("Error: nmcli terminated by signal %s (%d)\n"), - strsignal (signo), - signo); + nm_cli.return_value = 0x80 + signo; + g_string_printf (nm_cli.return_text, _("Error: nmcli terminated by signal %s (%d)"), + strsignal (signo), signo); g_main_loop_quit (loop); } break; case SIGTERM: - g_print (_("Error: nmcli terminated by signal %s (%d)\n"), - strsignal (signo), signo); + nm_cli.return_value = 0x80 + signo; + g_string_printf (nm_cli.return_text, _("Error: nmcli terminated by signal %s (%d)"), + strsignal (signo), signo); nmc_exit (); break; } @@ -633,13 +634,14 @@ main (int argc, char *argv[]) /* Save terminal settings */ tcgetattr (STDIN_FILENO, &termios_orig); - g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM)); - g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT)); - nmc_value_transforms_register (); nmc_init (&nm_cli); loop = g_main_loop_new (NULL, FALSE); + + g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM)); + g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT)); + if (process_command_line (&nm_cli, argc, argv)) g_main_loop_run (loop); diff --git a/clients/common/nm-client-utils.c b/clients/common/nm-client-utils.c index bf4dcc77..b6ec92de 100644 --- a/clients/common/nm-client-utils.c +++ b/clients/common/nm-client-utils.c @@ -399,9 +399,12 @@ nmc_device_reason_to_string (NMDeviceStateReason reason) return _("The device's parent changed"); case NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED: return _("The device parent's management changed"); - case NM_DEVICE_STATE_REASON_OVSDB_FAILED: return _("OpenVSwitch database connection failed"); + case NM_DEVICE_STATE_REASON_IP_ADDRESS_DUPLICATE: + return _("A duplicate IP address was detected"); + case NM_DEVICE_STATE_REASON_IP_METHOD_UNSUPPORTED: + return _("The selected IP method is not supported"); } /* TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) */ diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 9d0ac906..46b06fd4 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -4038,6 +4038,7 @@ _set_fcn_team_link_watchers (ARGS_SET_FCN) const char *const*iter; NMTeamLinkWatcher *watcher; + nm_setting_team_clear_link_watchers (NM_SETTING_TEAM (setting)); strv = nmc_strsplit_set (value, ",", 0); for (iter = (const char *const*) strv; *iter; iter++) { watcher = _parse_team_link_watcher (*iter, error); @@ -4110,6 +4111,7 @@ _set_fcn_team_port_link_watchers (ARGS_SET_FCN) const char *const*iter; NMTeamLinkWatcher *watcher; + nm_setting_team_port_clear_link_watchers (NM_SETTING_TEAM_PORT (setting)); strv = nmc_strsplit_set (value, ",", 0); for (iter = (const char *const*) strv; *iter; iter++) { watcher = _parse_team_link_watcher (*iter, error); @@ -4957,10 +4959,10 @@ static const NMMetaPropertyType _pt_gobject_devices = { "Properties available for the 'nsna_ping' link watcher:\n" \ " 'init-wait', 'interval', 'missed-max', 'target-host'*\n\n" \ "Properties available for the 'arp_ping' include all the ones for 'nsna_ping' and:\n" \ - " 'source-host', 'validate-active', 'validate-inactive', 'send-always'.\n\n" \ + " 'source-host'*, 'validate-active', 'validate-inactive', 'send-always'.\n\n" \ "Properties flagged with a '*' are mandatory.\n\n" \ "Example:\n" \ - " name=arp_ping,source-host=172.16.1.1,target-host=172.16.1.254; name=ethtool,delay-up=3\n") + " name=arp_ping source-host=172.16.1.1 target-host=172.16.1.254, name=ethtool delay-up=3\n") #define DEFINE_DCB_PROPRITY_PROPERTY_TYPE \ @@ -6623,7 +6625,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = { .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int, .value_infos = INT_VALUE_INFOS ( { - .value = 50, + .value = NM_SETTING_TEAM_RUNNER_TX_BALANCER_INTERVAL_DEFAULT, .nick = "default", } ), @@ -6640,7 +6642,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = { .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int, .value_infos = INT_VALUE_INFOS ( { - .value = 255, + .value = NM_SETTING_TEAM_RUNNER_SYS_PRIO_DEFAULT, .nick = "default", } ), @@ -6696,7 +6698,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM_PORT[] = { .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int, .value_infos = INT_VALUE_INFOS ( { - .value = -1, + .value = NM_SETTING_TEAM_PORT_QUEUE_ID_DEFAULT, .nick = "default", } ), @@ -6721,7 +6723,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM_PORT[] = { .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int, .value_infos = INT_VALUE_INFOS ( { - .value = 255, + .value = NM_SETTING_TEAM_PORT_LACP_PRIO_DEFAULT, .nick = "default", } ), diff --git a/clients/common/settings-docs.c b/clients/common/settings-docs.c index bf544ab6..bf5753c5 100644 --- a/clients/common/settings-docs.c +++ b/clients/common/settings-docs.c @@ -325,7 +325,7 @@ #define DESCRIBE_DOC_NM_SETTING_TEAM_NAME N_("The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\".") #define DESCRIBE_DOC_NM_SETTING_TEAM_NOTIFY_PEERS_COUNT N_("Corresponds to the teamd notify_peers.count.") #define DESCRIBE_DOC_NM_SETTING_TEAM_NOTIFY_PEERS_INTERVAL N_("Corresponds to the teamd notify_peers.interval.") -#define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER N_("Corresponds to the teamd runner.name. Permitted values are: \"roundrobin\", \"broadcast\", \"activebackup\", \"loadbalance\", \"lacp\".") +#define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER N_("Corresponds to the teamd runner.name. Permitted values are: \"roundrobin\", \"broadcast\", \"activebackup\", \"loadbalance\", \"lacp\". When setting the runner, all the properties specific to the runner will be reset to the default value; all the properties specific to other runners will be set to an empty value (or if not possible to a default value).") #define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER_ACTIVE N_("Corresponds to the teamd runner.active.") #define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER_AGG_SELECT_POLICY N_("Corresponds to the teamd runner.agg_select_policy.") #define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER_FAST_RATE N_("Corresponds to the teamd runner.fast_rate.") diff --git a/clients/common/settings-docs.c.in b/clients/common/settings-docs.c.in index bf544ab6..bf5753c5 100644 --- a/clients/common/settings-docs.c.in +++ b/clients/common/settings-docs.c.in @@ -325,7 +325,7 @@ #define DESCRIBE_DOC_NM_SETTING_TEAM_NAME N_("The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\".") #define DESCRIBE_DOC_NM_SETTING_TEAM_NOTIFY_PEERS_COUNT N_("Corresponds to the teamd notify_peers.count.") #define DESCRIBE_DOC_NM_SETTING_TEAM_NOTIFY_PEERS_INTERVAL N_("Corresponds to the teamd notify_peers.interval.") -#define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER N_("Corresponds to the teamd runner.name. Permitted values are: \"roundrobin\", \"broadcast\", \"activebackup\", \"loadbalance\", \"lacp\".") +#define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER N_("Corresponds to the teamd runner.name. Permitted values are: \"roundrobin\", \"broadcast\", \"activebackup\", \"loadbalance\", \"lacp\". When setting the runner, all the properties specific to the runner will be reset to the default value; all the properties specific to other runners will be set to an empty value (or if not possible to a default value).") #define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER_ACTIVE N_("Corresponds to the teamd runner.active.") #define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER_AGG_SELECT_POLICY N_("Corresponds to the teamd runner.agg_select_policy.") #define DESCRIBE_DOC_NM_SETTING_TEAM_RUNNER_FAST_RATE N_("Corresponds to the teamd runner.fast_rate.") |