summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-09 15:35:04 +0200
committerThomas Haller <thaller@redhat.com>2017-06-09 15:36:41 +0200
commit58c8140acb0b89bf6e9fecc70c2ae86b266f2eff (patch)
treefc3ad096d7c27cdb53460c9a178c9afe79055b09
parentaa099906f93264bda3ae34fca4dfbdde5455b2bb (diff)
parentee5fdcbfb50ec19b82715440e1c45f3c8e6ee5ea (diff)
downloadNetworkManager-58c8140acb0b89bf6e9fecc70c2ae86b266f2eff.tar.gz
cli: fix output of iface in overview output (rh#1460219)
https://bugzilla.redhat.com/show_bug.cgi?id=1460219
-rw-r--r--clients/cli/general.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clients/cli/general.c b/clients/cli/general.c
index 7fa982fd2d..b8947cf75d 100644
--- a/clients/cli/general.c
+++ b/clients/cli/general.c
@@ -1194,10 +1194,10 @@ device_overview (NmCli *nmc, NMDevice *device)
else
g_string_append_printf (outbuf, "%s, ", _("hw"));
- if ( nm_device_get_ip_iface (device)
- && g_strcmp0 (nm_device_get_ip_iface (device), nm_device_get_iface (device))
- && g_strcmp0 (nm_device_get_ip_iface (device), ""))
- g_string_append_printf (outbuf, "%s %s,", _("iface"), nm_device_get_ip_iface (device));
+ if (!NM_IN_STRSET (nm_device_get_ip_iface (device),
+ NULL,
+ nm_device_get_iface (device)))
+ g_string_append_printf (outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface (device));
if (nm_device_get_physical_port_id (device))
g_string_append_printf (outbuf, "%s %s, ", _("port"), nm_device_get_physical_port_id (device));