diff options
author | Francesco Giudici <fgiudici@redhat.com> | 2017-01-10 14:23:04 +0100 |
---|---|---|
committer | Francesco Giudici <fgiudici@redhat.com> | 2017-03-22 14:59:55 +0100 |
commit | 926823f6397ff7623e6f4d27d98988d95209887a (patch) | |
tree | c5f0593214be07e96ff359dbffdf23d4aaff3c7f | |
parent | c78dcaae8823d18d2e9fffd1e1fa14156a68f13c (diff) | |
download | NetworkManager-926823f6397ff7623e6f4d27d98988d95209887a.tar.gz |
nmcli: output just the raw value of vlan.flags when in terse mode
-rw-r--r-- | clients/cli/settings.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 396d6dbd61..d2d94913e4 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -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 * |