mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 01:00:36 +01:00
team: log error codes from teamd functions on failure
This commit is contained in:
parent
94d0d30e95
commit
2b2f8e907e
1 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue