Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Final part of fixing if_tap. The module needs to at...
details: https://anonhg.NetBSD.org/src/rev/ca56264bb56b
branches: trunk
changeset: 346963:ca56264bb56b
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Aug 08 09:42:33 2016 +0000
description:
Final part of fixing if_tap. The module needs to attach its cdevsw (and
detach it later).
diffstat:
sys/net/if_tap.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (41 lines):
diff -r 2453fe9bca88 -r ca56264bb56b sys/net/if_tap.c
--- a/sys/net/if_tap.c Mon Aug 08 09:39:06 2016 +0000
+++ b/sys/net/if_tap.c Mon Aug 08 09:42:33 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tap.c,v 1.87 2016/08/08 09:23:13 pgoyette Exp $ */
+/* $NetBSD: if_tap.c,v 1.88 2016/08/08 09:42:33 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.87 2016/08/08 09:23:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.88 2016/08/08 09:42:33 pgoyette Exp $");
#if defined(_KERNEL_OPT)
@@ -272,17 +272,16 @@
int error = 0;
if (tap_count != 0)
- error = EBUSY;
+ return EBUSY;
+#ifdef _MODULE
+ error = devsw_detach(NULL, &tap_cdevsw);
if (error == 0)
- devsw_detach(NULL, &tap_cdevsw);
-
+ sysctl_teardown(&tap_sysctl_clog);
+#endif
if (error == 0)
if_clone_detach(&tap_cloners);
-#ifdef _MODULE
- sysctl_teardown(&tap_sysctl_clog);
-#endif
return error;
}
Home |
Main Index |
Thread Index |
Old Index