From 2b2f8e907ec74147fb7e72ee1c299f9928ae56e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 5 Mar 2014 11:13:00 +0100 Subject: [PATCH] team: log error codes from teamd functions on failure --- src/devices/nm-device-team.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/devices/nm-device-team.c b/src/devices/nm-device-team.c index 256d872e02..1cc7641f3c 100644 --- a/src/devices/nm-device-team.c +++ b/src/devices/nm-device-team.c @@ -209,8 +209,9 @@ ensure_teamd_connection (NMDevice *self) priv->tdc = teamdctl_alloc (); g_assert (priv->tdc); err = teamdctl_connect (priv->tdc, nm_device_get_iface (self), NULL, NULL); - if (err) { - nm_log_err (LOGD_TEAM, "(%s): failed to connect to teamd", nm_device_get_iface (self)); + if (err != 0) { + nm_log_err (LOGD_TEAM, "(%s): failed to connect to teamd (err=%d)", + nm_device_get_iface (self), err); teamdctl_free (priv->tdc); priv->tdc = NULL; } @@ -680,8 +681,9 @@ enslave_slave (NMDevice *device, int err; err = teamdctl_port_config_update_raw (priv->tdc, slave_iface, config); - if (err) { - nm_log_err (LOGD_TEAM, "(%s): failed to update config for port %s", iface, slave_iface); + if (err != 0) { + nm_log_err (LOGD_TEAM, "(%s): failed to update config for port %s (err=%d)", + iface, slave_iface, err); return FALSE; } }