[Open-scap] Including default syntax for --report & --results

Martin Preisler mpreisle at redhat.com
Fri Nov 14 15:37:17 UTC 2014


----- Original Message -----
> From: "Steve Grubb" <sgrubb at redhat.com>
> To: open-scap-list at redhat.com
> Cc: "Martin Preisler" <mpreisle at redhat.com>, "Shawn Wells" <shawn at redhat.com>
> Sent: Friday, November 14, 2014 3:53:45 PM
> Subject: Re: [Open-scap] Including default syntax for --report & --results
> 
> On Friday, November 14, 2014 06:33:57 AM Martin Preisler wrote:
> > ----- Original Message -----
> > 
> > [snip]
> > 
> > How would the args parser know whether results should be "--report" or
> > default?
> 
> The -- will be classified as a new option. By telling it you allow an
> optional
> argument, then it will decide based on the first character of the next
> option.
> As long as its not a '-', then it will consider it an argument.

Right now `oscap` will generate a file called "--report" and put XCCDF
results into it. Without any complaints anywhere. But yeah, from the
documentation it seems possible to make it work as suggested by Shawn.

If people really want files starting with -- in the new version they
can just use --results=--crazy-file, I think that should work with
getopt.

Looking forward to the patch :-)

-- 
Martin Preisler




More information about the Open-scap-list mailing list