[sheepdog] [PATCH 4/6] use sd_getopt instead of getopt_long
Liu Yuan
namei.unix at gmail.com
Tue Nov 6 06:53:02 CET 2012
On 11/06/2012 01:48 PM, MORITA Kazutaka wrote:
>> I am wondering if we can built-in a callback in struct_sd_opt_param.
>> > Then users of sd_opt will only write body handler, which interpret the
>> > key-value string.
> Do you mean to create a callback for each <prefix, key> pair?
>
No. I meant, for example, object:kv-strings and disk:kv-strings, then we
can pass two handlers for them, one for object, the other for disk in
its own struct, which interpret the kv-strings only. So we don't need
init_cache_type(), that user manually write its own routines to
interpret prefix.
Thanks,
Yuan
More information about the sheepdog
mailing list