FreeBSD Bugzilla – Attachment 213052 Details for
Bug 245156
audio/pulseaudio: parse /dev/sndstat correctly to get device name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Testcase 3
testcase3.c (text/plain), 580 bytes, created by
lightside
on 2020-04-04 11:43:03 UTC
(
hide
)
Description:
Testcase 3
Filename:
MIME Type:
Creator:
lightside
Created:
2020-04-04 11:43:03 UTC
Size:
580 bytes
patch
obsolete
>/* > cc -o testcase3 testcase3.c && ./testcase3 >*/ > >#include <stdio.h> >#include <string.h> > >int main() { >#if 1 > char line[] = "pcm4: <Realtek (0x1168) (Rear Analog 5.1/2.0)> (play/rec) default"; >#else > char line[] = "pcm4: <Realtek (0x1168) <#> (Rear Analog 5.1/2.0)> (play/rec) default"; >#endif > int device; > > if (sscanf(line, "pcm%i: ", &device) != 1) > return 0; > > char *k = strchr(line, ':'); > > if (!k) > return 0; > > k++; > k += strspn(k, " "); > > if (*k == '<') { > char *e = strrchr(k, '>'); > > if (e) { > *e = 0; > ++k; > } > } > > printf("%d: %s\n", device, k); > > return 0; >}
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 Raw
Actions:
View
Attachments on
bug 245156
:
212817
|
212838
|
212854
|
212855
|
212875
|
212876
|
212877
|
212878
|
213004
|
213005
|
213006
|
213025
|
213026
|
213050
|
213051
| 213052 |
228663
|
228708