On Mon, Aug 24, 2009 at 01:11:51PM +0100, Richard W.M. Jones wrote:
On Mon, Aug 24, 2009 at 12:30:30PM +0100, Richard W.M. Jones wrote:
> On Mon, Aug 24, 2009 at 01:21:39PM +0200, Jim Meyering wrote:
> > Also, it is good policy, IMHO, to make it so a program works the same
> > way no matter where the actual binary happens to be located in a file
> > system hierarchy.
>
> Well, if you can think of a better way to do it ... I can't.
>
> > >> + enum { HELP_OPTION = CHAR_MAX + 1 };
> > >> +
> > >> static const char *options = "a:Df:h::im:nrv?Vx";
> > >> static const struct option long_options[] = {
> > >> { "add", 1, 0, 'a' },
> > >> { "cmd-help", 2, 0, 'h' },
> > >> { "file", 1, 0, 'f' },
> > >> - { "help", 0, 0, '?' },
> > >> + { "help", 0, 0, HELP_OPTION },
> > >
> > > I'm unclear on why we do this - what's wrong with using
'?'?
> >
> > So that we can distinguish getop-diagnosed failure
> > (where it returns '?') from --help.
>
> Right, I see.
That was ACK BTW.
.. or rather, ACK to this part of the patch.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat
http://et.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://et.redhat.com/~rjones/libguestfs/
See what it can do:
http://et.redhat.com/~rjones/libguestfs/recipes.html