iproute2/bridge
Serhey Popovych fe99adbca4 utils: Introduce and use nodev() helper routine
There is a couple of places where we report error in case of no network
device is found. In all of them we output message in the same format to
stderr and either return -1 or 1 to the caller or exit with -1.

Introduce new helper function nodev() that takes name of the network
device caused error and returns -1 to it's caller. Either call exit()
or return to the caller to preserve behaviour before change.

Use -nodev() in traffic control (tc) code to return 1.

Simplify expression for checking for argument being 0/NULL in @if
statement.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
2018-03-11 17:58:36 -07:00
..
.gitignore Add bridge command 2012-08-01 15:23:49 -07:00
Makefile SPDX license identifiers 2017-11-24 12:21:35 -08:00
br_common.h bridge: colorize output and use JSON print library 2018-02-21 08:41:31 -08:00
bridge.c bridge: colorize output and use JSON print library 2018-02-21 08:41:31 -08:00
fdb.c utils: Introduce and use nodev() helper routine 2018-03-11 17:58:36 -07:00
link.c utils: Introduce and use nodev() helper routine 2018-03-11 17:58:36 -07:00
mdb.c utils: Introduce and use nodev() helper routine 2018-03-11 17:58:36 -07:00
monitor.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
vlan.c utils: Introduce and use nodev() helper routine 2018-03-11 17:58:36 -07:00