aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
authorPhil Oester <kernel@linuxace.com>2011-03-14 02:22:06 -0400
committerDavid S. Miller <davem@davemloft.net>2011-03-15 22:29:39 -0400
commit5f86cad1e8224af9e3b9b43dd84b146a9ff0df87 (patch)
tree45c7140cd8651fa51a285a4596539a3d56688af1 /drivers/net/bonding/bond_sysfs.c
parente826eafa65c6f1f7c8db5a237556cebac57ebcc5 (diff)
bonding: Improve syslog message at device creation time
When the bonding module is loaded, it creates bond0 by default. Then, when attempting to create bond0, the following messages are printed to syslog: kernel: bonding: bond0 is being created... kernel: bonding: Bond creation failed. Which seems to indicate a problem, when in reality there is no problem. Since the actual error code is passed down from bond_create, make use of it to print a bit less ominous message: kernel: bonding: bond0 is being created... kernel: bond0 already exists. Signed-off-by: Phil Oester <kernel@linuxace.com> Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 72bb0f6cc9bf..e718144c5cfa 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -118,7 +118,10 @@ static ssize_t bonding_store_bonds(struct class *cls,
118 pr_info("%s is being created...\n", ifname); 118 pr_info("%s is being created...\n", ifname);
119 rv = bond_create(net, ifname); 119 rv = bond_create(net, ifname);
120 if (rv) { 120 if (rv) {
121 pr_info("Bond creation failed.\n"); 121 if (rv == -EEXIST)
122 pr_info("%s already exists.\n", ifname);
123 else
124 pr_info("%s creation failed.\n", ifname);
122 res = rv; 125 res = rv;
123 } 126 }
124 } else if (command[0] == '-') { 127 } else if (command[0] == '-') {