From: Mitch Williams Date: Wed, 9 Nov 2005 18:35:21 +0000 (-0800) Subject: [PATCH] bonding: get slave name from actual slave instead of param list X-Git-Tag: v2.6.16-rc1~474^2~22^2~7^2~96^2~12 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f418b2ac49e97b7b763e0473320a201eec15ed3;p=linux-2.6 [PATCH] bonding: get slave name from actual slave instead of param list Take the primary slave name shown in /proc from the actual slave dev instead of from the command-line parameter, which won't be present if the bond is created via sysfs. Signed-off-by: Mitch Williams Acked-by: Jay Vosburgh Signed-off-by: John W. Linville --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9d9f027a9a..3e9b47d9f2 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3278,8 +3278,8 @@ static void bond_info_show_master(struct seq_file *seq) if (USES_PRIMARY(bond->params.mode)) { seq_printf(seq, "Primary Slave: %s\n", - (bond->params.primary[0]) ? - bond->params.primary : "None"); + (bond->primary_slave) ? + bond->primary_slave->dev->name : "None"); seq_printf(seq, "Currently Active Slave: %s\n", (curr) ? curr->dev->name : "None");