summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-02-15 13:26:54 +0100
committerThomas Haller <thaller@redhat.com>2017-02-17 14:41:27 +0100
commit257484e7bac2813d0cf1bc922ef57e6b781b1c96 (patch)
tree842e87e82e8602e92e5f5329a0587f914eb99d4a
parentc9dc0eba65565d361e32200894386da5e5c2d001 (diff)
downloadNetworkManager-257484e7bac2813d0cf1bc922ef57e6b781b1c96.tar.gz
wifi: also show the NM D-Bus path for the Wi-Fi AP in nm_wifi_ap_to_string()
-rw-r--r--src/devices/wifi/nm-wifi-ap.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
index b60020ac3c..7de0838f97 100644
--- a/src/devices/wifi/nm-wifi-ap.c
+++ b/src/devices/wifi/nm-wifi-ap.c
@@ -622,6 +622,7 @@ nm_wifi_ap_to_string (const NMWifiAP *self,
{
const NMWifiAPPrivate *priv;
const char *supplicant_id = "-";
+ const char *export_path;
guint32 chan;
char b1[200];
@@ -630,10 +631,16 @@ nm_wifi_ap_to_string (const NMWifiAP *self,
priv = NM_WIFI_AP_GET_PRIVATE (self);
chan = nm_utils_wifi_freq_to_channel (priv->freq);
if (priv->supplicant_path)
- supplicant_id = strrchr (priv->supplicant_path, '/');
+ supplicant_id = strrchr (priv->supplicant_path, '/') ?: supplicant_id;
+
+ export_path = nm_exported_object_get_path (NM_EXPORTED_OBJECT (self));
+ if (export_path)
+ export_path = strrchr (export_path, '/') ?: export_path;
+ else
+ export_path = "/";
g_snprintf (str_buf, buf_len,
- "%17s %-32s [ %c %3u %3u%% %c W:%04X R:%04X ] %3us %s",
+ "%17s %-32s [ %c %3u %3u%% %c W:%04X R:%04X ] %3us sup:%s [nm:%s]",
priv->address ?: "(none)",
nm_sprintf_buf (b1, "%s%s%s",
NM_PRINT_FMT_QUOTED (priv->ssid, "\"", nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len), "\"", "(none)")),
@@ -650,7 +657,8 @@ nm_wifi_ap_to_string (const NMWifiAP *self,
priv->wpa_flags & 0xFFFF,
priv->rsn_flags & 0xFFFF,
priv->last_seen > 0 ? ((now_s > 0 ? now_s : nm_utils_get_monotonic_timestamp_s ()) - priv->last_seen) : -1,
- supplicant_id);
+ supplicant_id,
+ export_path);
return str_buf;
}