Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 87621 - Handling option errors (bug or feature?)
Handling option errors (bug or feature?)
Product: Red Hat Linux
Classification: Retired
Component: popt (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2003-03-30 23:46 EST by Marcus Harnisch
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-03 11:03:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marcus Harnisch 2003-03-30 23:46:29 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20021208

Description of problem:
When a multi-character option string contains at least one unknown
option, the entire option string (including valid options) is returned
by poptBadOption().

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Write a tool using the basic option parsing loop.

Actual Results:  Example (again, using my [not so] imaginary tool getpopt)
$ ./getpopt -of -- -bar
getpopt: unknown option '-bar'
$ ./getpopt -of -- -foo
getpopt: unknown option '-foo'
-f -- 

Expected Results:  $ ./getpopt -of -- -bar
getpopt: unknown option '-b'
getpopt: unknown option '-a'
getpopt: unknown option '-r'
$ ./getpopt -of -- -foo
getpopt: unknown option '-o'
getpopt: unknown option '-o'
-f -- 

Additional info:
Comment 1 Jeff Johnson 2003-04-03 11:03:42 EST
I call these featlets or bugtures depending on mood ;-)

Yes, I can see that there is potential for confusion
when displaying the output of poptBadOption, but the current
behavior of returning the entire token isn't too bad; Think
of the behavior as displaying additional contextual info.

Deferred for contemplation when I next make a pass through popt code.

Note You need to log in before you can comment on or make changes to this bug.