Module Name: src Committed By: christos Date: Sat Dec 11 04:21:17 UTC 2010
Modified Files: src/sys/netsmb: smb_dev.c smb_iod.c Log Message: Back this out. Fails lockdebug with duplicate lock initialization. Please test with LOCKDEBUG! To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/netsmb/smb_dev.c cvs rdiff -u -r1.36 -r1.37 src/sys/netsmb/smb_iod.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/netsmb/smb_dev.c diff -u src/sys/netsmb/smb_dev.c:1.34 src/sys/netsmb/smb_dev.c:1.35 --- src/sys/netsmb/smb_dev.c:1.34 Fri Dec 10 14:44:18 2010 +++ src/sys/netsmb/smb_dev.c Fri Dec 10 23:21:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_dev.c,v 1.34 2010/12/10 19:44:18 ahoka Exp $ */ +/* $NetBSD: smb_dev.c,v 1.35 2010/12/11 04:21:17 christos Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.34 2010/12/10 19:44:18 ahoka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.35 2010/12/11 04:21:17 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -68,10 +68,6 @@ #include <netsmb/smb_rq.h> #ifdef __NetBSD__ -#include <sys/module.h> -#endif - -#ifdef __NetBSD__ static struct smb_dev **smb_devtbl; /* indexed by minor */ #define SMB_GETDEV(dev) (smb_devtbl[minor(dev)]) #define NSMB_DEFNUM 4 @@ -466,42 +462,6 @@ } DEV_MODULE (dev_netsmb, nsmb_dev_load, 0); -#else -MODULE(MODULE_CLASS_MISC, nsmb, NULL); - -static int -nsmb_modcmd(modcmd_t cmd, void *arg) -{ - devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR; - int error = 0; - - switch (cmd) { - case MODULE_CMD_INIT: - error = smb_sm_init(); - if (error) - break; - error = smb_iod_init(); - if (error) { - smb_sm_done(); - break; - } - error = - devsw_attach("nsmb", NULL, &bmajor, &nsmb_cdevsw, &cmajor); - if (error) - return error; - - break; - case MODULE_CMD_FINI: - smb_iod_done(); - smb_sm_done(); - error = devsw_detach(NULL, &nsmb_cdevsw); - break; - default: - error = ENOTTY; - break; - } - return error; -} #endif /* !__NetBSD__ */ /* Index: src/sys/netsmb/smb_iod.c diff -u src/sys/netsmb/smb_iod.c:1.36 src/sys/netsmb/smb_iod.c:1.37 --- src/sys/netsmb/smb_iod.c:1.36 Fri Dec 10 14:44:18 2010 +++ src/sys/netsmb/smb_iod.c Fri Dec 10 23:21:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_iod.c,v 1.36 2010/12/10 19:44:18 ahoka Exp $ */ +/* $NetBSD: smb_iod.c,v 1.37 2010/12/11 04:21:17 christos Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.36 2010/12/10 19:44:18 ahoka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_iod.c,v 1.37 2010/12/11 04:21:17 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -744,8 +744,10 @@ return 0; } +#ifndef __NetBSD__ int smb_iod_done(void) { return 0; } +#endif