Module Name: src Committed By: pgoyette Date: Mon Aug 8 09:23:13 UTC 2016
Modified Files: src/sys/net: if_tap.c Log Message: Add the devsw_attach stuff, since the tap device can be accessed via /dev/tap This is a partial fix for the build. The rump tap component will be fixed shortly. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/net/if_tap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if_tap.c diff -u src/sys/net/if_tap.c:1.86 src/sys/net/if_tap.c:1.87 --- src/sys/net/if_tap.c:1.86 Mon Aug 8 07:35:12 2016 +++ src/sys/net/if_tap.c Mon Aug 8 09:23:13 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.86 2016/08/08 07:35:12 pgoyette Exp $ */ +/* $NetBSD: if_tap.c,v 1.87 2016/08/08 09:23:13 pgoyette Exp $ */ /* * Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.86 2016/08/08 07:35:12 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.87 2016/08/08 09:23:13 pgoyette Exp $"); #if defined(_KERNEL_OPT) @@ -239,6 +239,9 @@ int tap_clone_destroyer(device_t); #ifdef _MODULE static struct sysctllog *tap_sysctl_clog; + +devmajor_t tap_bmajor = -1, tap_cmajor = -1; + #endif static u_int tap_count; @@ -259,6 +262,7 @@ tapinit(void) if_clone_attach(&tap_cloners); #ifdef _MODULE sysctl_tap_setup(&tap_sysctl_clog); + devsw_attach("tap", NULL, &tap_bmajor, tap_cdevsw, &tap_cmajor); #endif } @@ -271,6 +275,9 @@ tapdetach(void) error = EBUSY; if (error == 0) + devsw_detach(NULL, &tap_cdevsw); + + if (error == 0) if_clone_detach(&tap_cloners); #ifdef _MODULE