[PATCH 6/7 v2] bonding: Log slave activation/deactivation



[Turns out this patch depended on a patch which I have not yet submitted.
 This is a respin with the dependency removed.]

Signed-off-by: Thomas Graf <tgraf redhat com>
---
 src/nm-device.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/nm-device.c b/src/nm-device.c
index 5721f73..a61ca8a 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -791,8 +791,18 @@ handle_slave_activation (NMDevice *slave, NMDevice *master)
 			return FALSE;
 
 		nm_device_hw_bring_up (slave, TRUE, NULL);
+	} else {
+		nm_log_warn (LOGD_DEVICE, "(%s): Unable to enslave. Unknown slave type '%s'",
+		             nm_device_get_iface (slave), nm_setting_connection_get_slave_type (s_con));
+
+		/* Abort activation */
+		return FALSE;
 	}
 
+	nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) enslaved to %s",
+	             nm_device_get_iface (slave),
+				 nm_device_get_iface (master));
+
 	return TRUE;
 }
 
@@ -810,6 +820,11 @@ handle_slave_deactivation (NMDevice *slave, NMDevice *master)
 
 	if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BOND_SETTING_NAME))
 		nm_system_iface_release (slave, master);
+	else
+		return;
+
+	nm_log_info (LOGD_DEVICE, "Device %s released from master %s",
+	             nm_device_get_iface (slave), nm_device_get_iface (master));
 }
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]