summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2008-12-29 17:52:43 +0000
committerpooka <pooka@NetBSD.org>2008-12-29 17:52:43 +0000
commit13de128f7693894dcedc3e3612e3d5273831f2ed (patch)
tree8e740553eaa4498bb921ae4c36f8945709c2c560 /sys/dev
parent7b9ae626a8f80d32db57c8e27e0d1f44ee63025d (diff)
Actually, revert previous - I doubt it would work with a non-rump kernel.
The filthy #ifdef _MODULE lives to stink another day.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/putter/putter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/putter/putter.c b/sys/dev/putter/putter.c
index 3309efa3e49..3ce6399ee73 100644
--- a/sys/dev/putter/putter.c
+++ b/sys/dev/putter/putter.c
@@ -1,4 +1,4 @@
-/* $NetBSD: putter.c,v 1.17 2008/12/29 17:47:08 pooka Exp $ */
+/* $NetBSD: putter.c,v 1.18 2008/12/29 17:52:43 pooka Exp $ */
/*
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.17 2008/12/29 17:47:08 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.18 2008/12/29 17:52:43 pooka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -618,6 +618,7 @@ MODULE(MODULE_CLASS_MISC, putter, NULL);
static int
putter_modcmd(modcmd_t cmd, void *arg)
{
+#ifdef _MODULE
int bmajor = -1, cmajor = -1;
switch (cmd) {
@@ -629,4 +630,9 @@ putter_modcmd(modcmd_t cmd, void *arg)
default:
return ENOTTY;
}
+#else
+ if (cmd == MODULE_CMD_INIT)
+ return 0;
+ return ENOTTY;
+#endif
}