aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2005-11-09 10:35:21 -0800
committerJohn W. Linville <linville@tuxdriver.com>2005-11-13 14:48:19 -0500
commit0f418b2ac49e97b7b763e0473320a201eec15ed3 (patch)
tree035d1f855c355371e0b84ea5d22470def2be1a6b /drivers/net/bonding
parent[PATCH] bonding: Add transmit policy to /proc (diff)
downloadlinux-dev-0f418b2ac49e97b7b763e0473320a201eec15ed3.tar.xz
linux-dev-0f418b2ac49e97b7b763e0473320a201eec15ed3.zip
[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 <mitch.a.williams@intel.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9d9f027a9af4..3e9b47d9f21b 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");