Bug 117991

Summary: I cannot understand poptGetArgs
Product: [Retired] Red Hat Linux Reporter: Stephane Bortzmeyer <bortz>
Component: poptAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-10 21:39:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A simple test case none

Description Stephane Bortzmeyer 2004-03-10 20:42:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0)
Gecko/20020623 Debian/1.0.0-0.woody.1

Description of problem:

Hello,

I try to write a C program which uses popt. If it finds a given option
(-m in 
the example I send you), it should stop processing for a future pass
of popt 
(you see why I cannot use getopt). From the man page, I thought that 
poptGetArgs shoudl give me the leftover arguments but it always send NULL.

Any idea? 



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

How reproducible:
Always

Steps to Reproduce:
1.gcc -o test-popt test-popt.c -lpopt
2../test-popt -v -m foobar -r -u
3.
    

Actual Results:  The assertion fails.


Expected Results:  The remaining args, "-r -u".


Additional info:

Comment 1 Stephane Bortzmeyer 2004-03-10 20:43:44 UTC
Created attachment 98438 [details]
A simple test case

Comment 2 Jeff Johnson 2004-03-10 21:39:55 UTC
Look at the programs run by "make check" for examples.