Bug 85810 - pactl command line parameter parsing is broken for decreasing volume
Summary: pactl command line parameter parsing is broken for decreasing volume
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-03 15:17 UTC by Réczey Bálint
Modified: 2014-11-17 11:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Réczey Bálint 2014-11-03 15:17:27 UTC
$ pactl set-sink-volume  0 -3%
pactl: invalid option -- '3'
The following works fine:
$ pactl -- set-sink-volume  0 -3%

Probably options should not be reordered.
Comment 1 Peter Meerwald 2014-11-17 11:03:46 UTC
this is getopt() behaviour

getopt() should stop processing after the first non-option argument is encountered

setting the environment variable POSIXLY_CORRECT should also work around the issue

we could/should check at compile time if getopt() supports "+" as the first character of optstring (GNU extension)
Comment 2 Peter Meerwald 2014-11-17 11:17:51 UTC
fixed with commit 997e3696 (post v5.0) which adds the "+" to getopt()'s optstring


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.