Skip to contentSkip to conversation

alfred: vis: Fix netlink function fallback

PATCH Applied Sven Eckelmann 2 participants 2 messages Sep 22, 2016 – Oct 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 vis/vis.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
vis/vis.c +2 -2
index b865508..677f8aa 100644
@@ -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);
Signature · 1 line
2.9.3
#1 lore raw
Quoted 6 lines · CEST Sven Eckelmann

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")

Applied in revision 2208996.

Thanks!
Simon