mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 16:20:09 +01:00
nmcli: output property values in "parsable" mode when the "--terse" option is specified (again)
Commit 623d888801 was reverted during
refactoring nmcli to simplify merge conflicts. Restore the behavior
of the patch.
This commit is contained in:
parent
660fee1622
commit
fcc19ea760
1 changed files with 5 additions and 1 deletions
|
|
@ -4785,6 +4785,7 @@ setting_details (NMSetting *setting, NmCli *nmc, const char *one_prop, gboolean
|
|||
guint i;
|
||||
size_t tmpl_len;
|
||||
gs_free char *s_all = NULL;
|
||||
NmcPropertyGetType type = NMC_PROPERTY_GET_PRETTY;
|
||||
|
||||
g_return_val_if_fail (NM_IS_SETTING (setting), FALSE);
|
||||
|
||||
|
|
@ -4796,6 +4797,9 @@ setting_details (NMSetting *setting, NmCli *nmc, const char *one_prop, gboolean
|
|||
|
||||
g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (setting, setting_info->general->get_setting_gtype ()), FALSE);
|
||||
|
||||
if (nmc->print_output == NMC_PRINT_TERSE)
|
||||
type = NMC_PROPERTY_GET_PARSABLE;
|
||||
|
||||
tmpl_len = sizeof (NmcOutputField) * (setting_info->properties_num + 1);
|
||||
tmpl = g_memdup (_get_nmc_output_fields (setting_info), tmpl_len);
|
||||
|
||||
|
|
@ -4812,7 +4816,7 @@ setting_details (NMSetting *setting, NmCli *nmc, const char *one_prop, gboolean
|
|||
set_val_str (arr, i, property_info->property_type->get_fcn (setting_info,
|
||||
property_info,
|
||||
setting,
|
||||
NMC_PROPERTY_GET_PRETTY,
|
||||
type,
|
||||
show_secrets));
|
||||
} else
|
||||
set_val_str (arr, i, g_strdup (_(HIDDEN_TEXT)));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue