Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Now that we're only calling devsw_attach() in the modula...
details: https://anonhg.NetBSD.org/src/rev/bcdc9a42526d
branches: trunk
changeset: 346525:bcdc9a42526d
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jul 17 02:48:07 2016 +0000
description:
Now that we're only calling devsw_attach() in the modular driver, it
is not ok for the driver/module to already exist. So don't ignore
EEXIST.
diffstat:
sys/net/bpf.c | 8 +++-----
sys/netsmb/smb_dev.c | 6 ++----
2 files changed, 5 insertions(+), 9 deletions(-)
diffs (63 lines):
diff -r 86333b3ca7db -r bcdc9a42526d sys/net/bpf.c
--- a/sys/net/bpf.c Sun Jul 17 02:09:10 2016 +0000
+++ b/sys/net/bpf.c Sun Jul 17 02:48:07 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf.c,v 1.201 2016/07/17 01:16:30 pgoyette Exp $ */
+/* $NetBSD: bpf.c,v 1.202 2016/07/17 02:49:52 pgoyette Exp $ */
/*
* Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.201 2016/07/17 01:16:30 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.202 2016/07/17 02:49:52 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_bpf.h"
@@ -2115,7 +2115,7 @@
#ifdef _MODULE
devmajor_t bmajor, cmajor;
#endif
- int error;
+ int error = 0;
switch (cmd) {
@@ -2125,8 +2125,6 @@
bmajor = cmajor = NODEVMAJOR;
error = devsw_attach("bpf", NULL, &bmajor,
&bpf_cdevsw, &cmajor);
- if (error == EEXIST)
- error = 0; /* maybe built-in ... improve eventually */
#endif
if (error)
break;
diff -r 86333b3ca7db -r bcdc9a42526d sys/netsmb/smb_dev.c
--- a/sys/netsmb/smb_dev.c Sun Jul 17 02:09:10 2016 +0000
+++ b/sys/netsmb/smb_dev.c Sun Jul 17 02:48:07 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_dev.c,v 1.47 2016/07/17 00:33:28 pgoyette Exp $ */
+/* $NetBSD: smb_dev.c,v 1.48 2016/07/17 02:48:07 pgoyette Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.47 2016/07/17 00:33:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.48 2016/07/17 02:48:07 pgoyette Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -383,8 +383,6 @@
#ifdef _MODULE
error =
devsw_attach("nsmb", NULL, &bmajor, &nsmb_cdevsw, &cmajor);
- if (error == EEXIST) /* builtin */
- error = 0;
#endif
if (error) {
nsmbdetach();
Home |
Main Index |
Thread Index |
Old Index