From ea2b965ac2f2c6c8ceb7220f5a656533ac3553af Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 30 Aug 2021 19:27:49 +0200 Subject: [PATCH] core: cleanup logging of set-link for speed/autoneg There is no point in logging the current speed/duplex. OK, with the "*", we could at least see whether the printed values are to be set, or are currently configured on the interface. But mixing these two outputs is confusing and meaningless. Either log what we are about to do, or what the current configuration is. Not a mix of both. --- src/core/devices/nm-device-ethernet.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/devices/nm-device-ethernet.c b/src/core/devices/nm-device-ethernet.c index 6df6aaa837..62993b6f8d 100644 --- a/src/core/devices/nm-device-ethernet.c +++ b/src/core/devices/nm-device-ethernet.c @@ -934,13 +934,10 @@ link_negotiation_set(NMDevice *device) _LOGD(LOGD_DEVICE, "set-link: configure auto-negotiation"); else { _LOGD(LOGD_DEVICE, - "set-link: configure %snegotiation (%u Mbit%s, %s duplex%s)", + "set-link: configure %snegotiation (%u Mbit, %s duplex)", autoneg ? "auto-" : "static ", - speed ?: link_speed, - speed ? "" : "*", - duplex ? nm_platform_link_duplex_type_to_string(duplex) - : nm_platform_link_duplex_type_to_string(link_duplex), - duplex ? "" : "*"); + speed, + nm_platform_link_duplex_type_to_string(duplex)); } if (!priv->ethtool_prev_set) {