From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] alfred: vis: Fix netlink function fallback
Date: Thu, 22 Sep 2016 23:46:07 +0200 [thread overview]
Message-ID: <20160922214607.22123-1-sven@narfation.org> (raw)
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>
---
vis/vis.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vis/vis.c b/vis/vis.c
index b865508..677f8aa 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);
--
2.9.3
next reply other threads:[~2016-09-22 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 21:46 Sven Eckelmann [this message]
2016-10-14 13:33 ` [B.A.T.M.A.N.] [PATCH] alfred: vis: Fix netlink function fallback Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160922214607.22123-1-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox