Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147483072
D55671.id173228.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55671.id173228.diff
View Options
diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c
--- a/usr.sbin/virtual_oss/virtual_oss/main.c
+++ b/usr.sbin/virtual_oss/virtual_oss/main.c
@@ -2239,24 +2239,6 @@
strncpy(profile.wav_name, optarg, sizeof(profile.wav_name));
break;
case 'd':
- if (strlen(optarg) > VMAX_STRING - 1)
- return ("Device name too long");
- strncpy(profile.oss_name, optarg, sizeof(profile.oss_name));
-
- if (profile.bits == 0 || voss_dsp_sample_rate == 0 ||
- profile.channels == 0 || voss_dsp_samples == 0)
- return ("Missing -b, -r, -c or -s parameters");
-
- val = (voss_dsp_samples *
- profile.bits * profile.channels) / 8;
- if (val <= 0 || val >= (1024 * 1024))
- return ("-s option value is too big");
-
- ptr = dup_profile(&profile, opt_amp, opt_pol,
- opt_mute[0], opt_mute[1], 0, 1);
- if (ptr != NULL)
- return (ptr);
- break;
case 'L':
case 'l':
if (strlen(optarg) > VMAX_STRING - 1)
@@ -2265,15 +2247,20 @@
if (profile.bits == 0 || voss_dsp_sample_rate == 0 ||
profile.channels == 0 || voss_dsp_samples == 0)
- return ("Missing -b, -r, -r or -s parameters");
+ return ("Missing -b, -r, -c or -s parameters");
val = (voss_dsp_samples *
profile.bits * profile.channels) / 8;
if (val <= 0 || val >= (1024 * 1024))
return ("-s option value is too big");
- ptr = dup_profile(&profile, opt_amp, opt_pol,
- opt_mute[0], opt_mute[1], c == 'L', 0);
+ if (c == 'd') {
+ ptr = dup_profile(&profile, opt_amp, opt_pol,
+ opt_mute[0], opt_mute[1], 0, 1);
+ } else {
+ ptr = dup_profile(&profile, opt_amp, opt_pol,
+ opt_mute[0], opt_mute[1], c == 'L', 0);
+ }
if (ptr != NULL)
return (ptr);
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 12, 8:33 AM (9 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29340069
Default Alt Text
D55671.id173228.diff (1 KB)
Attached To
Mode
D55671: virtual_oss: Combine -d, -l and -L option getopt code
Attached
Detach File
Event Timeline
Log In to Comment