diff options
| author | Michael Biebl <biebl@debian.org> | 2017-12-12 15:53:07 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-12-12 15:53:07 +0100 |
| commit | afcd268ea7b1149fbfb66bce4eca659b675da0a2 (patch) | |
| tree | c3fca2203ad17434daf3ccf576582bd66aa41ab2 /clients/cli | |
| parent | 417f6015c3dc8c47cf27daa59f64e0e36c521b9c (diff) | |
New upstream version 1.10.2 upstream/1.10.2
Diffstat (limited to 'clients/cli')
| -rw-r--r-- | clients/cli/connections.c | 11 | ||||
| -rw-r--r-- | clients/cli/general.c | 2 | ||||
| -rw-r--r-- | clients/cli/settings.c | 4 | ||||
| -rw-r--r-- | clients/cli/utils.c | 12 |
4 files changed, 18 insertions, 11 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index c05a9e82..83b1f28a 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -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. * - * Copyright 2010 - 2015 Red Hat, Inc. + * Copyright 2010 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -146,7 +146,8 @@ const NmcMetaGenericInfo *const nmc_fields_con_active_details_general[] = { NM_SETTING_MACSEC_SETTING_NAME"," \ NM_SETTING_MACVLAN_SETTING_NAME"," \ NM_SETTING_VXLAN_SETTING_NAME"," \ - NM_SETTING_PROXY_SETTING_NAME + NM_SETTING_PROXY_SETTING_NAME"," \ + NM_SETTING_TC_CONFIG_SETTING_NAME // NM_SETTING_DUMMY_SETTING_NAME // NM_SETTING_WIMAX_SETTING_NAME @@ -2656,7 +2657,7 @@ do_connection_down (NmCli *nmc, int argc, char **argv) const GPtrArray *connections; const char *selector = NULL; - if (arg_num == 1) + if (arg_num == 1 && nmc->complete) nmc_complete_strings (*arg_ptr, "id", "uuid", "path", "apath", NULL); if ( strcmp (*arg_ptr, "id") == 0 @@ -7569,6 +7570,8 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t g_free (menu_ctx.valid_props_str); g_weak_ref_clear (&weak); + quit (); + /* Save history file */ save_history_cmds (nm_connection_get_uuid (connection)); @@ -8605,7 +8608,7 @@ do_connection_export (NmCli *nmc, int argc, char **argv) nmc->return_value = NMC_RESULT_ERROR_UNKNOWN; goto finish; } - close (fd); + nm_close (fd); path = tmpfile; } diff --git a/clients/cli/general.c b/clients/cli/general.c index 5ae31e1b..7ac6b22c 100644 --- a/clients/cli/general.c +++ b/clients/cli/general.c @@ -743,7 +743,7 @@ do_general_logging (NmCli *nmc, int argc, char **argv) "AGENTS", "SETTINGS", "SUSPEND", "CORE", "DEVICE", "OLPC", "INFINIBAND", "FIREWALL", "ADSL", "BOND", "VLAN", "BRIDGE", "DBUS_PROPS", "TEAM", "CONCHECK", "DCB", "DISPATCH", "AUDIT", - "SYSTEMD", "VPN_PLUGIN", "PROXY", NULL); + "SYSTEMD", "VPN_PLUGIN", "PROXY", "TC", NULL); } domains = *argv; } else { diff --git a/clients/cli/settings.c b/clients/cli/settings.c index e0db1b5b..69275aad 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -371,8 +371,12 @@ _env_warn_fcn_handle (const NMMetaEnvironment *environment, const char *fmt_l10n, /* the untranslated format string, but it is marked for translation using N_(). */ va_list ap) { + NmCli *nmc = environment_user_data; gs_free char *m = NULL; + if (nmc->complete) + return; + NM_PRAGMA_WARNING_DISABLE("-Wformat-nonliteral") m = g_strdup_vprintf (_(fmt_l10n), ap); NM_PRAGMA_WARNING_REENABLE diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 570bfb98..f20e24ce 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -1504,16 +1504,16 @@ nmc_terminal_spawn_pager (const NmcConfig *nmc_config) nm_cli.pager_pid = fork (); if (nm_cli.pager_pid == -1) { g_printerr (_("Failed to fork pager: %s\n"), strerror (errno)); - close (fd[0]); - close (fd[1]); + nm_close (fd[0]); + nm_close (fd[1]); return; } /* In the child start the pager */ if (nm_cli.pager_pid == 0) { dup2 (fd[0], STDIN_FILENO); - close (fd[0]); - close (fd[1]); + nm_close (fd[0]); + nm_close (fd[1]); setenv ("LESS", "FRSXMK", 1); setenv ("LESSCHARSET", "utf-8", 1); @@ -1553,8 +1553,8 @@ nmc_terminal_spawn_pager (const NmcConfig *nmc_config) if (dup2 (fd[1], STDERR_FILENO) < 0) g_printerr (_("Failed to duplicate pager pipe: %s\n"), strerror (errno)); - close (fd[0]); - close (fd[1]); + nm_close (fd[0]); + nm_close (fd[1]); } /*****************************************************************************/ |