FreeBSD Bugzilla – Attachment 39362 Details for
Bug 62077
[sound] [patch] Make it possible to abbreviate mixer(8) device names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mixer.diff
mixer.diff (text/plain), 879 bytes, created by
Ronald Klop
on 2004-01-29 19:40:16 UTC
(
hide
)
Description:
mixer.diff
Filename:
MIME Type:
Creator:
Ronald Klop
Created:
2004-01-29 19:40:16 UTC
Size:
879 bytes
patch
obsolete
>diff -ruN0 /usr/src/usr.sbin/mixer/mixer.8 mixer/mixer.8 >--- /usr/src/usr.sbin/mixer/mixer.8 Fri Sep 26 13:21:19 2003 >+++ mixer/mixer.8 Thu Jan 29 12:33:15 2004 >@@ -90,0 +91,3 @@ >+The argument >+.Ar dev >+may be abbreviated to its shortest non-ambigious form. >diff -ruN0 /usr/src/usr.sbin/mixer/mixer.c mixer/mixer.c >--- /usr/src/usr.sbin/mixer/mixer.c Thu Jan 22 23:01:13 2004 >+++ mixer/mixer.c Thu Jan 29 12:28:03 2004 >@@ -62 +62 @@ >- int foo; >+ int device, i, matches; >@@ -64,3 +64,7 @@ >- for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) >- if ((1 << foo) & mask && !strcmp(names[foo], name)) >- break; >+ matches = 0; >+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) >+ if ((1 << i) & mask >+ && !strncmp(names[i], name, strlen(name))) { >+ device = i; >+ matches++; >+ } >@@ -68 +72 @@ >- return foo == SOUND_MIXER_NRDEVICES ? -1 : foo; >+ return (matches == 1 ? device : -1);
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 62077
: 39362