Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netsmb Finish previous - now that we're not calling devs...
details: https://anonhg.NetBSD.org/src/rev/cb241b21a33f
branches: trunk
changeset: 346519:cb241b21a33f
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jul 17 00:27:03 2016 +0000
description:
Finish previous - now that we're not calling devsw_attach unnecessarily,
we can enclose some additional variables in #ifdef _MODULE / #endif
diffstat:
sys/netsmb/smb_dev.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r d8406b5466c5 -r cb241b21a33f sys/netsmb/smb_dev.c
--- a/sys/netsmb/smb_dev.c Sun Jul 17 00:17:14 2016 +0000
+++ b/sys/netsmb/smb_dev.c Sun Jul 17 00:27:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_dev.c,v 1.45 2016/07/17 00:17:14 pgoyette Exp $ */
+/* $NetBSD: smb_dev.c,v 1.46 2016/07/17 00:27:03 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.45 2016/07/17 00:17:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.46 2016/07/17 00:27:03 pgoyette Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -86,6 +86,7 @@
dev_type_close(nsmb_dev_close);
dev_type_ioctl(nsmb_dev_ioctl);
+#ifdef _MODULE
const struct cdevsw nsmb_cdevsw = {
.d_open = nsmb_dev_open,
.d_close = nsmb_dev_close,
@@ -100,7 +101,7 @@
.d_discard = nodiscard,
.d_flag = D_OTHER,
};
-
+#endif
static bool nsmb_inited = false;
@@ -372,7 +373,9 @@
static int
nsmb_modcmd(modcmd_t cmd, void *arg)
{
+#ifdef _MODULE
devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
+#endif
int error = 0;
switch (cmd) {
Home |
Main Index |
Thread Index |
Old Index