Module Name:    src
Committed By:   pgoyette
Date:           Sun Jul 17 02:49:52 UTC 2016

Modified Files:
        src/sys/net: bpf.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/net/bpf.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/bpf.c
diff -u src/sys/net/bpf.c:1.201 src/sys/net/bpf.c:1.202
--- src/sys/net/bpf.c:1.201	Sun Jul 17 01:16:30 2016
+++ src/sys/net/bpf.c	Sun Jul 17 02:49:52 2016
@@ -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 @@ bpf_modcmd(modcmd_t cmd, void *arg)
 #ifdef _MODULE
 	devmajor_t bmajor, cmajor;
 #endif
-	int error;
+	int error = 0;
 
 
 	switch (cmd) {
@@ -2125,8 +2125,6 @@ bpf_modcmd(modcmd_t cmd, void *arg)
 		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;

Reply via email to