]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: check slave set command firstly
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Mon, 11 Feb 2019 18:49:48 +0000 (10:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 16:35:50 +0000 (11:35 -0500)
commit0ccd54989498b6444d8ff67382e067417909a229
treeb0bea840cacafc205a1976799b70b0345ad282d0
parent0ec06bdddcbb68b4c0f876d5c8d810ba7c2eb9c0
bonding: check slave set command firstly

This patch is a little improvement. If user use the
command shown as below, we should print the info [1]
instead of [2]. The eth0 exists actually, and it may
confuse user.

$ echo "eth0" > /sys/class/net/bond4/bonding/slaves

[1] "bond4: no command found in slaves file - use +ifname or -ifname"
[2] "write error: No such device"

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_options.c