net/failsafe: fix error string after ownership call
Ownership API returns a negative value, strerror expects a valid errno
value, thus positive.
Coverity issue: 260401
Fixes: dcd0c9c32b
("net/failsafe: use ownership mechanism for slaves")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
This commit is contained in:
parent
e8df563bac
commit
9df324ad08
@ -79,9 +79,9 @@ fs_bus_init(struct rte_eth_dev *dev)
|
||||
" %d named %s", i, da->name);
|
||||
}
|
||||
ret = rte_eth_dev_owner_set(pid, &PRIV(dev)->my_owner);
|
||||
if (ret) {
|
||||
if (ret < 0) {
|
||||
INFO("sub_device %d owner set failed (%s),"
|
||||
" will try again later", i, strerror(ret));
|
||||
" will try again later", i, strerror(-ret));
|
||||
continue;
|
||||
} else if (strncmp(rte_eth_devices[pid].device->name, da->name,
|
||||
strlen(da->name)) != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user