<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - pactl parse_volume() cannot read negatives"
href="https://bugs.freedesktop.org/show_bug.cgi?id=77108#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - pactl parse_volume() cannot read negatives"
href="https://bugs.freedesktop.org/show_bug.cgi?id=77108">bug 77108</a>
from <span class="vcard"><a class="email" href="mailto:pmeerw@pmeerw.net" title="Peter Meerwald <pmeerw@pmeerw.net>"> <span class="fn">Peter Meerwald</span></a>
</span></b>
<pre>I think this can be easily fixed:
see getopt(3):
""By default, getopt() permutes the contents of argv as it scans, so that
eventually all the nonoptions are at the end. Two other modes are also
implemented. If the first character of optstring is '+' or the envi‐
ronment variable POSIXLY_CORRECT is set, then option processing stops
as soon as a nonoption argument is encountered. If the first character
of optstring is '-', then each nonoption argv-element is handled as if
it were the argument of an option with character code 1. (This is used
by programs that were written to expect options and other argv-elements
in any order and that care about the ordering of the two.) The special
argument "--" forces an end of option-scanning regardless of the scan‐
ning mode.""
prepend optstring with '+' to use POSIXLY_CORRECT mode
- while ((c = getopt_long(argc, argv, "s:n:h", long_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "+s:n:h", long_options, NULL)) != -1)
{
posting a patch</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>