nmcli: output just the raw value of vlan.flags when in terse mode

This commit is contained in:
Francesco Giudici 2017-01-10 14:23:04 +01:00
parent 3e3d36450c
commit 39f1d44ec8

View file

@ -900,10 +900,13 @@ bytes_to_string (GBytes *bytes)
}
static char *
vlan_flags_to_string (guint32 flags)
vlan_flags_to_string (guint32 flags, NmcPropertyGetType get_type)
{
GString *flag_str;
if (get_type == NMC_PROPERTY_GET_PARSABLE)
return g_strdup_printf ("%u", flags);
if (flags == 0)
return g_strdup (_("0 (NONE)"));
@ -4724,7 +4727,7 @@ static char *
nmc_property_vlan_get_flags (NMSetting *setting, NmcPropertyGetType get_type)
{
NMSettingVlan *s_vlan = NM_SETTING_VLAN (setting);
return vlan_flags_to_string (nm_setting_vlan_get_flags (s_vlan));
return vlan_flags_to_string (nm_setting_vlan_get_flags (s_vlan), get_type);
}
static char *