[sheepdog] [PATCH 0/6] introduce sd_getopt to parse command line options

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Nov 6 05:04:44 CET 2012


At Tue, 06 Nov 2012 11:01:38 +0800,
Liu Yuan wrote:
> 
> On 11/06/2012 12:02 AM, MORITA Kazutaka wrote:
> > prefix' sounds a bit strange to me because most of options doesn't
> > require <key>=<value> pairs.  For example, when '-p 7000' or '-c
> > corosync' is given, calling '7000' or 'corosync' prefix isn't strange?
> > I think that <key>=<value> pairs are just attributes.  Rather than
> > generalizing syntax, I think enumerating acceptable syntaxes looks
> > easy to understand:
> > 
> >   [no arugment]
> >   --<option>
> >   --<option> <key>=<value>[,<key>=<value>[,...]]
> > 
> >   [require arugment]
> >   --<option> <arg>
> >   --<option> <arg>:<key>=<value>[,<key>=<value>[,...]]
> > 
> 
> This looks a bit more confusing for 'no argument' case.

Well, what I wanted to say is 'prefix' is not an appropriate word for
'zookeeper', 'accord', or 'object', and would like to find out a
better name.

Anyway, this is probably a matter of taste and I'm fine with adding a
helper named sd_opt_get_prefix.



More information about the sheepdog mailing list