]> err.no Git - linux-2.6/commitdiff
[PATCH] bonding: get slave name from actual slave instead of param list
authorMitch Williams <mitch.a.williams@intel.com>
Wed, 9 Nov 2005 18:35:21 +0000 (10:35 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Sun, 13 Nov 2005 19:48:19 +0000 (14:48 -0500)
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>
drivers/net/bonding/bond_main.c

index 9d9f027a9af4848b28d5b548efaf377f60ce869c..3e9b47d9f21bc1dfe66173c771103baa013ddca7 100644 (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");