From b11cbdbb9dbe425063e2693fb3dfdff9eb7eaae9 Mon Sep 17 00:00:00 2001 From: ad Date: Thu, 13 Nov 2008 10:05:52 +0000 Subject: [PATCH] compat_ossaudio module, so others can depend on it. --- distrib/sets/lists/base/lkm.mi | 4 +++- sys/compat/ossaudio/ossaudio.c | 19 +++++++++++++++++-- sys/modules/compat_ossaudio/Makefile | 10 ++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 sys/modules/compat_ossaudio/Makefile diff --git a/distrib/sets/lists/base/lkm.mi b/distrib/sets/lists/base/lkm.mi index 2639248e2ba5..be9c4d66d2e1 100644 --- a/distrib/sets/lists/base/lkm.mi +++ b/distrib/sets/lists/base/lkm.mi @@ -1,4 +1,4 @@ -# $NetBSD: lkm.mi,v 1.31 2008/11/12 14:33:11 ad Exp $ +# $NetBSD: lkm.mi,v 1.32 2008/11/13 10:05:52 ad Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -17,6 +17,8 @@ ./@MODULEDIR@/coda/coda.kmod base-kernel-modules ./@MODULEDIR@/coda5 base-kernel-modules ./@MODULEDIR@/coda5/coda5.kmod base-kernel-modules +./@MODULEDIR@/compat_ossaudio base-kernel-modules +./@MODULEDIR@/compat_ossaudio/compat_ossaudio.kmod base-kernel-modules ./@MODULEDIR@/dirhash base-obsolete obsolete ./@MODULEDIR@/dirhash/dirhash.kmod base-obsolete obsolete ./@MODULEDIR@/efs base-kernel-modules diff --git a/sys/compat/ossaudio/ossaudio.c b/sys/compat/ossaudio/ossaudio.c index 2a00bd54733e..62977e56b85c 100644 --- a/sys/compat/ossaudio/ossaudio.c +++ b/sys/compat/ossaudio/ossaudio.c @@ -1,4 +1,4 @@ -/* $NetBSD: ossaudio.c,v 1.63 2008/04/28 20:23:45 martin Exp $ */ +/* $NetBSD: ossaudio.c,v 1.64 2008/11/13 10:05:52 ad Exp $ */ /*- * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.63 2008/04/28 20:23:45 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.64 2008/11/13 10:05:52 ad Exp $"); #include #include @@ -42,10 +42,13 @@ __KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.63 2008/04/28 20:23:45 martin Exp $") #include #include #include +#include #include #include +MODULE(MODULE_CLASS_MISC, compat_ossaudio, NULL); + #ifdef AUDIO_DEBUG #define DPRINTF(x) if (ossdebug) printf x int ossdebug = 0; @@ -63,6 +66,18 @@ static int enum_to_mask(struct audiodevinfo *di, int enm); static void setblocksize(file_t *, struct audio_info *); +static int +compat_ossaudio_modcmd(modcmd_t cmd, void *arg) +{ + + switch (cmd) { + case MODULE_CMD_INIT: + case MODULE_CMD_FINI: + return 0; + default: + return ENOTTY; + } +} int oss_ioctl_audio(struct lwp *l, const struct oss_sys_ioctl_args *uap, register_t *retval) diff --git a/sys/modules/compat_ossaudio/Makefile b/sys/modules/compat_ossaudio/Makefile new file mode 100644 index 000000000000..0ca786586d0a --- /dev/null +++ b/sys/modules/compat_ossaudio/Makefile @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1 2008/11/13 10:05:52 ad Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/compat/ossaudio + +KMOD= compat_ossaudio +SRCS= ossaudio.c + +.include