diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2013-05-24 22:36:24 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2013-05-31 09:38:04 +0200 |
commit | dca3584b26c419f8d876b9cffc34533ff10cac27 (patch) | |
tree | 2c5d6d30ae57d83b436df7694b3a05b8a463f982 | |
parent | 5f93c4314dee51afc5db93e32ceffd9b550a0d88 (diff) | |
download | NetworkManager-dca3584b26c419f8d876b9cffc34533ff10cac27.tar.gz |
cli: 'dev wifi list': change SECURITY values
* remove "Encrypted" tag
The "Encrypted: " stuff was initially copied from nm-tool, but it doesn't help
here much. See also http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a734c836a56f3170202f0555f1a03c9b2835775c
for APs with WPA & RSN IEs, but no privacy flag.
* remove a space from "WPA ", etc. strings. Translators often leave it out
and thus break output.
* change "WPA" to "WPA1" to make it clearer
* use "802.1X" instead of "Enterprise" to save some characters
-rw-r--r-- | cli/src/devices.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/cli/src/devices.c b/cli/src/devices.c index f9add57013..005bd9f456 100644 --- a/cli/src/devices.c +++ b/cli/src/devices.c @@ -441,22 +441,26 @@ fill_output_access_point (gpointer data, gpointer user_data) sig_level_0; security_str = g_string_new (NULL); - if ( !(flags & NM_802_11_AP_FLAGS_PRIVACY) - && (wpa_flags != NM_802_11_AP_SEC_NONE) - && (rsn_flags != NM_802_11_AP_SEC_NONE)) - g_string_append (security_str, _("Encrypted: ")); if ( (flags & NM_802_11_AP_FLAGS_PRIVACY) && (wpa_flags == NM_802_11_AP_SEC_NONE) - && (rsn_flags == NM_802_11_AP_SEC_NONE)) - g_string_append (security_str, _("WEP ")); - if (wpa_flags != NM_802_11_AP_SEC_NONE) - g_string_append (security_str, _("WPA ")); - if (rsn_flags != NM_802_11_AP_SEC_NONE) - g_string_append (security_str, _("WPA2 ")); + && (rsn_flags == NM_802_11_AP_SEC_NONE)) { + g_string_append (security_str, _("WEP")); + g_string_append_c (security_str, ' '); + } + if (wpa_flags != NM_802_11_AP_SEC_NONE) { + g_string_append (security_str, _("WPA1")); + g_string_append_c (security_str, ' '); + } + if (rsn_flags != NM_802_11_AP_SEC_NONE) { + g_string_append (security_str, _("WPA2")); + g_string_append_c (security_str, ' '); + } if ( (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) - || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) - g_string_append (security_str, _("Enterprise ")); + || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) { + g_string_append (security_str, _("802.1X")); + g_string_append_c (security_str, ' '); + } if (security_str->len > 0) g_string_truncate (security_str, security_str->len-1); /* Chop off last space */ |