Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netsmb * remove #ifdef nonsense (which caused the lossag...



details:   https://anonhg.NetBSD.org/src/rev/014b75f57a40
branches:  trunk
changeset: 759828:014b75f57a40
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Dec 17 14:27:34 2010 +0000

description:
* remove #ifdef nonsense (which caused the lossage in the first place)
* make it a DRIVER so that it autoloads when /dev/nsmb is opened

diffstat:

 sys/netsmb/smb_dev.c |  16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diffs (55 lines):

diff -r 34e83793cd63 -r 014b75f57a40 sys/netsmb/smb_dev.c
--- a/sys/netsmb/smb_dev.c      Fri Dec 17 13:37:37 2010 +0000
+++ b/sys/netsmb/smb_dev.c      Fri Dec 17 14:27:34 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smb_dev.c,v 1.38 2010/12/17 13:24:45 pooka Exp $       */
+/*     $NetBSD: smb_dev.c,v 1.39 2010/12/17 14:27:34 pooka Exp $       */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.38 2010/12/17 13:24:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.39 2010/12/17 14:27:34 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -47,6 +47,7 @@
 #include <sys/lock.h>
 #include <sys/malloc.h>
 #include <sys/file.h>          /* Must come after sys/malloc.h */
+#include <sys/module.h>
 #include <sys/mbuf.h>
 #include <sys/poll.h>
 #include <sys/proc.h>
@@ -356,13 +357,7 @@
        return error;
 }
 
-
-#ifdef _MODULE
-
-#include <sys/module.h>
-
-MODULE(MODULE_CLASS_MISC, nsmb, NULL);
-
+MODULE(MODULE_CLASS_DRIVER, nsmb, NULL);
 static int
 nsmb_modcmd(modcmd_t cmd, void *arg)
 {
@@ -394,8 +389,6 @@
 
        return error;
 }
-#endif /* _MODULE */
-
 
 /*
  * Convert a file descriptor to appropriate smb_share pointer
@@ -441,4 +434,3 @@
        *sspp = ssp;
        return 0;
 }
-



Home | Main Index | Thread Index | Old Index