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

Liu Yuan namei.unix at gmail.com
Mon Nov 5 15:23:22 CET 2012


On 11/05/2012 06:51 PM, morita.kazutaka at gmail.com wrote:
> This series introduces sd_getopt to parse command line options, which
> aims for us to maintain sheep options easily.  With this patch, what
> we need to do to add a command line option is only modifying a
> sheep_option variable; short options, long options, and help message
> will be automatically generated.
> 
> All command options must follow the folllowing syntax.
>   --<option> [<arg>[:<key>=<value>[,<key>=<value>[,...]]]]
> 
> E.g.
>   -d
>   -p 7001
>   -c zookeeper:server=xx.xx.xx.xx,yy.yy.yy.yy
>   -w object:size=100M,directio=true

It seems that this patch set doesn't allow following pattern:
 -j {dir=, size=, skip=}

all these 3 keys are all optional and don't need prefix like
 -j journal:dir=, size=, skip=...

Thanks,
Yuan



More information about the sheepdog mailing list