Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev/lib/libaudio Use AUDIO_DEVICE instead of 0 as t...
details: https://anonhg.NetBSD.org/src/rev/c6f9e2ef1932
branches: trunk
changeset: 762691:c6f9e2ef1932
user: riz <riz%NetBSD.org@localhost>
date: Fri Feb 25 19:27:05 2011 +0000
description:
Use AUDIO_DEVICE instead of 0 as the minor number for /dev/audio since
0 is incorrect. While I'm here, add /dev/sound, audioctl, and mixer too.
ok pooka@
diffstat:
sys/rump/dev/lib/libaudio/component.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r 9bb6d0554ac5 -r c6f9e2ef1932 sys/rump/dev/lib/libaudio/component.c
--- a/sys/rump/dev/lib/libaudio/component.c Fri Feb 25 18:56:20 2011 +0000
+++ b/sys/rump/dev/lib/libaudio/component.c Fri Feb 25 19:27:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: component.c,v 1.1 2010/05/01 23:19:56 pooka Exp $ */
+/* $NetBSD: component.c,v 1.2 2011/02/25 19:27:05 riz Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.1 2010/05/01 23:19:56 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.2 2011/02/25 19:27:05 riz Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -34,6 +34,8 @@
#include <sys/mbuf.h>
#include <sys/stat.h>
+#include <dev/audio_if.h>
+
#include "ioconf.c"
#include "rump_private.h"
@@ -53,6 +55,15 @@
&audio_cdevsw, &cmaj)) != 0)
panic("audio devsw attach failed: %d", error);
if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/audio", '0',
- cmaj, 0, 4)) !=0)
+ cmaj, AUDIO_DEVICE, 4)) !=0)
panic("cannot create audio device nodes: %d", error);
+ if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/sound", '0',
+ cmaj, SOUND_DEVICE, 4)) !=0)
+ panic("cannot create sound device nodes: %d", error);
+ if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/audioctl", '0',
+ cmaj, AUDIOCTL_DEVICE, 4)) !=0)
+ panic("cannot create audioctl device nodes: %d", error);
+ if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/mixer", '0',
+ cmaj, MIXER_DEVICE, 4)) !=0)
+ panic("cannot create mixer device nodes: %d", error);
}
Home |
Main Index |
Thread Index |
Old Index