cli: restore previous name of IN-USE AP property

Before commit a63c4d0824 ("cli: use designated initializers for
setting NmcOutputField fields") each field had a @name and a
@name_l10n , which were equal for all properties except for wifi
IN-USE:

 {"IN-USE",     N_("*")},          /* 15 */

The commit removed @name_l10n so now the displayed name is equal to
the field name. But now:

 $ nmcli device wifi list
 Error: 'device wifi': invalid field 'IN-USE'; allowed fields:
 NAME,SSID,SSID-HEX,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,
 WPA-FLAGS,RSN-FLAGS,DEVICE,ACTIVE,*,DBUS-PATH

The new field name should be 'IN-USE' and not '*', otherwise scripts
doing "-f IN-USE" will break. As a side effect we now show 'IN-USE'
instead of '*' in the column header, which seems easier to understand:

IN-USE  SSID     MODE   CHAN  RATE       SIGNAL  BARS  SECURITY
*       default  Infra  5     54 Mbit/s  71      ▂▄▆_  WPA2
        guest    Infra  1     54 Mbit/s  62      ▂▄▆_  WPA2

Fixes: a63c4d0824
This commit is contained in:
Beniamino Galvani
2017-04-01 21:21:43 +02:00
parent 3fe144f934
commit db07b867a6

View File

@@ -168,7 +168,7 @@ NmcOutputField nmc_fields_dev_wifi_list[] = {
OUTPUT_FIELD_WITH_NAME ("RSN-FLAGS"), /* 12 */
OUTPUT_FIELD_WITH_NAME ("DEVICE"), /* 13 */
OUTPUT_FIELD_WITH_NAME ("ACTIVE"), /* 14 */
OUTPUT_FIELD_WITH_NAME ("*"), /* 15 */
OUTPUT_FIELD_WITH_NAME ("IN-USE"), /* 15 */
OUTPUT_FIELD_WITH_NAME ("DBUS-PATH"), /* 16 */
{ 0 }
};