From de763a42ecd56dcdb61a6144d4ff7cc47b049b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 29 Aug 2012 10:39:09 +0200 Subject: [PATCH] cli: put indexes into [] for AP and NSP in 'nmcli dev list' output AP1 -> AP[1] NSP1 -> NSP[1] It's more readable (section names are AP an NSP) and it makes indexing format conform to other data, like IP4.DNS[1]. --- cli/src/devices.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/devices.c b/cli/src/devices.c index 6b9367b413..3d58679e2c 100644 --- a/cli/src/devices.c +++ b/cli/src/devices.c @@ -403,7 +403,7 @@ detail_access_point (gpointer data, gpointer user_data) if (security_str->len > 0) g_string_truncate (security_str, security_str->len-1); /* Chop off last space */ - ap_name = g_strdup_printf ("AP%d", info->index++); /* AP */ + ap_name = g_strdup_printf ("AP[%d]", info->index++); /* AP */ info->nmc->allowed_fields[0].value = ap_name; info->nmc->allowed_fields[1].value = ssid_str; info->nmc->allowed_fields[2].value = bssid; @@ -461,7 +461,7 @@ detail_wimax_nsp (NMWimaxNsp *nsp, NmCli *nmc, NMDevice *dev, int idx) } quality_str = g_strdup_printf ("%u", nm_wimax_nsp_get_signal_quality (nsp)); - nsp_name = g_strdup_printf ("NSP%d", idx); /* NSP */ + nsp_name = g_strdup_printf ("NSP[%d]", idx); /* NSP */ nmc->allowed_fields[0].value = nsp_name; nmc->allowed_fields[1].value = nm_wimax_nsp_get_name (nsp);