[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>
This commit is contained in:
Mitch Williams 2005-11-09 10:35:21 -08:00 committed by John W. Linville
parent c61b75ad03
commit 0f418b2ac4
1 changed files with 2 additions and 2 deletions

View File

@ -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");