Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libtap Part 2 of fixing if_tap module.
details: https://anonhg.NetBSD.org/src/rev/72339c61c434
branches: trunk
changeset: 346961:72339c61c434
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Aug 08 09:29:45 2016 +0000
description:
Part 2 of fixing if_tap module.
diffstat:
sys/rump/net/lib/libtap/tap_component.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diffs (55 lines):
diff -r 3afcd23679ed -r 72339c61c434 sys/rump/net/lib/libtap/tap_component.c
--- a/sys/rump/net/lib/libtap/tap_component.c Mon Aug 08 09:23:13 2016 +0000
+++ b/sys/rump/net/lib/libtap/tap_component.c Mon Aug 08 09:29:45 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tap_component.c,v 1.3 2016/01/26 23:12:19 pooka Exp $ */
+/* $NetBSD: tap_component.c,v 1.4 2016/08/08 09:29:45 pgoyette Exp $ */
/*
* Copyright (c) 2015 Wei Liu. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tap_component.c,v 1.3 2016/01/26 23:12:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tap_component.c,v 1.4 2016/08/08 09:29:45 pgoyette Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -37,27 +37,26 @@
#include "ioconf.h"
-CFDRIVER_DECL(tap, DV_IFNET, NULL);
-
RUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
{
extern const struct cdevsw tap_cdevsw;
- devmajor_t bmaj, cmaj;
+ extern devmajor_t tap_bmajor, tap_cmajor;
int error;
- config_cfdriver_attach(&tap_cd);
- tapattach(0);
-
- bmaj = cmaj = NODEVMAJOR;
- error = devsw_attach("tap", NULL, &bmaj, &tap_cdevsw, &cmaj);
+ error = devsw_attach("tap", NULL, &tap_bmajor,
+ &tap_cdevsw, &tap_cmajor);
if (error != 0)
panic("tap devsw attach failed: %d", error);
- error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/tap", cmaj, 0xfffff);
+ error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/tap", tap_cmajor,
+ 0xfffff);
if (error != 0)
panic("cannot create tap device node: %d", error);
- error = rump_vfs_makedevnodes(S_IFCHR, "/dev/tap", '0', cmaj, 0, 4);
+ error = rump_vfs_makedevnodes(S_IFCHR, "/dev/tap", '0', tap_cmajor,
+ 0, 4);
if (error != 0)
panic("cannot create tap[0-4] device node: %d", error);
+
+ devsw_detach(NULL, &tap_cdevsw);
}
Home |
Main Index |
Thread Index |
Old Index