mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 12:18:13 +02:00
platform: modify address to_string() to show raw lifetime values
The "lifetime" part when printing an address in nm_platform_ip[46]_address_to_string() is supposed to show the raw, internal values of the address. We already have the "lft" and "pref" output that presents the expiries based on now. These fields are already crafted to show what the user probably wants to see when looking at debugging log. "lifetime" should not do any special casing and just print the raw values. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
c29496125f
commit
c6d45a4083
1 changed files with 0 additions and 6 deletions
|
|
@ -2107,12 +2107,6 @@ _lifetime_to_string (guint32 timestamp, guint32 lifetime, gint32 now, char *buf,
|
|||
static const char *
|
||||
_lifetime_summary_to_string (gint32 now, guint32 timestamp, guint32 preferred, guint32 lifetime, char *buf, size_t buf_size)
|
||||
{
|
||||
if (timestamp == 0) {
|
||||
if (preferred == NM_PLATFORM_LIFETIME_PERMANENT && lifetime == NM_PLATFORM_LIFETIME_PERMANENT)
|
||||
return "";
|
||||
if (preferred == 0 && lifetime == 0)
|
||||
return " lifetime unset";
|
||||
}
|
||||
g_snprintf (buf, buf_size, " lifetime %d-%u[%u,%u]",
|
||||
(signed) now, (unsigned) timestamp, (unsigned) preferred, (unsigned) lifetime);
|
||||
return buf;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue