Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit 2208996ac1c442556c1f8de67a48f0782fbf7e1b Author: Sven Eckelmann sven@narfation.org Date: Thu Sep 22 23:46:07 2016 +0200
alfred: vis: Fix netlink function fallback
The netlink functions return -EOPNOTSUPP when the kernel doesn't support the netlink command. The caller can then fall back to debugfs. So check for -EOPNOTSUPP and not EOPNOTSUPP.
Fixes: bca55a86fecd ("alfred: vis: Add support for netlink") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
2208996ac1c442556c1f8de67a48f0782fbf7e1b vis/vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vis/vis.c b/vis/vis.c index d6bac41..94e583e 100644 --- a/vis/vis.c +++ b/vis/vis.c @@ -361,7 +361,7 @@ static int parse_transtable_local(struct globals *globals) int ret;
ret = parse_transtable_local_netlink(globals); - if (ret != EOPNOTSUPP) + if (ret != -EOPNOTSUPP) return ret;
return parse_transtable_local_debugfs(globals); @@ -602,7 +602,7 @@ static int parse_orig_list(struct globals *globals) int ret;
ret = parse_orig_list_netlink(globals); - if (ret != EOPNOTSUPP) + if (ret != -EOPNOTSUPP) return ret;
return parse_orig_list_debugfs(globals);