mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 03:00:37 +01:00
clients: fix printing hexadecimal enum values
Use the 'x' conversion specifier for hexadecimal numbers. Fixes:f53218ed7c('cli: add property type for enum and showcase for ipv6.addr-gen-mode'): (cherry picked from commit420554a72e) (cherry picked from commit9fe7ef6ca3) (cherry picked from commitd4141a1806)
This commit is contained in:
parent
0c9a6ff0ba
commit
449538d860
1 changed files with 2 additions and 2 deletions
|
|
@ -1000,7 +1000,7 @@ _get_fcn_gobject_enum (ARGS_GET_FCN)
|
|||
s = format_numeric_hex
|
||||
|| ( format_numeric_hex_unknown
|
||||
&& !G_IS_ENUM_CLASS (gtype_class ?: (gtype_class = g_type_class_ref (gtype))))
|
||||
? g_strdup_printf ("0x%"G_GINT64_FORMAT, v)
|
||||
? g_strdup_printf ("0x%"G_GINT64_MODIFIER"x", v)
|
||||
: g_strdup_printf ("%"G_GINT64_FORMAT, v);
|
||||
RETURN_STR_TO_FREE (g_steal_pointer (&s));
|
||||
}
|
||||
|
|
@ -1018,7 +1018,7 @@ _get_fcn_gobject_enum (ARGS_GET_FCN)
|
|||
if ( format_numeric_hex
|
||||
|| ( format_numeric_hex_unknown
|
||||
&& !G_IS_ENUM_CLASS (gtype_class ?: (gtype_class = g_type_class_ref (gtype)))))
|
||||
nm_sprintf_buf (s_numeric, "0x%"G_GINT64_FORMAT, v);
|
||||
nm_sprintf_buf (s_numeric, "0x%"G_GINT64_MODIFIER"x", v);
|
||||
else
|
||||
nm_sprintf_buf (s_numeric, "%"G_GINT64_FORMAT, v);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue