[v2] alfred: vis: Don't fail when debugfs cannot be mounted

Message ID 20161101121937.31890-1-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit a5802877c5c7bc958d801fc528ed7c7ee8c1dc4a
Delegated to: Simon Wunderlich
Headers

Commit Message

Sven Eckelmann Nov. 1, 2016, 12:19 p.m. UTC
  The vis server is supposed to use netlink when available. This allows to
work on systems without debugfs and under network namespaces. Thus it is
now not strictly required anymore to have debugfs available.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 vis/vis.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
  

Comments

Simon Wunderlich Nov. 1, 2016, 3 p.m. UTC | #1
On Tuesday, November 1, 2016 1:19:37 PM CET Sven Eckelmann wrote:
> The vis server is supposed to use netlink when available. This allows to
> work on systems without debugfs and under network namespaces. Thus it is
> now not strictly required anymore to have debugfs available.
> 
> Signed-off-by: Sven Eckelmann <sven@narfation.org>

Applied in a580287.

Thanks,
     Simon
  

Patch

diff --git a/vis/vis.c b/vis/vis.c
index f4d13c7..51d7f5c 100644
--- a/vis/vis.c
+++ b/vis/vis.c
@@ -1120,13 +1120,7 @@  static struct globals *vis_init(int argc, char *argv[])
 
 static int vis_server(struct globals *globals)
 {
-	char *debugfs_mnt;
-
-	debugfs_mnt = debugfs_mount(NULL);
-	if (!debugfs_mnt) {
-		fprintf(stderr, "Error - can't mount or find debugfs\n");
-		return EXIT_FAILURE;
-	}
+	debugfs_mount(NULL);
 
 	globals->push = (struct alfred_push_data_v0 *) globals->buf;
 	globals->vis_data = (struct vis_v1 *) (globals->buf + sizeof(*globals->push) + sizeof(struct alfred_data));