FreeBSD Bugzilla – Attachment 13597 Details for
Bug 25799
pcm doesn't always autocreate device aliases w/ DEVFS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 787 bytes, created by
Alex Kapranoff
on 2001-03-14 11:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Alex Kapranoff
Created:
2001-03-14 11:50:01 UTC
Size:
787 bytes
patch
obsolete
>--- /sys/dev/sound/pcm/sound.c.orig Wed Mar 14 10:57:40 2001 >+++ sound.c Wed Mar 14 13:46:23 2001 >@@ -90,7 +90,7 @@ > > #ifdef USING_DEVFS > int snd_unit; >-TUNABLE_INT_DECL("hw.snd.unit", 0, snd_unit); >+TUNABLE_INT_DECL("hw.snd.unit", -1, snd_unit); > #endif > > SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD, 0, "Sound driver"); >@@ -193,8 +193,16 @@ > } > > unit = snd_unit; >- if (unit < 0 || unit > devclass_get_maxunit(pcm_devclass)) >- return; >+ if (unit == -1) { >+ /* find the first unit */ >+ for(unit = 0; >+ unit <= devclass_get_maxunit(pcm_devclass); ++unit) >+ if (devclass_get_softc(pcm_devclass, unit) != NULL) >+ break; >+ } else { >+ if (unit < 0 || unit > devclass_get_maxunit(pcm_devclass)) >+ return; >+ } > if (devclass_get_softc(pcm_devclass, unit) == NULL) > return;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25799
: 13597