[libvirt] [PATCH 1/3] virsh: add support for accepting arbitrary argv
Eric Blake
eblake at redhat.com
Fri Oct 15 21:43:30 UTC 2010
On 10/15/2010 03:25 PM, Matthias Bolte wrote:
>> typedef enum {
>> - VSH_OT_NONE = 0, /* none */
>> - VSH_OT_BOOL, /* boolean option */
>> - VSH_OT_STRING, /* string option */
>> - VSH_OT_INT, /* int option */
>> - VSH_OT_DATA /* string data (as non-option) */
>> + VSH_OT_BOOL, /* boolean option */
>
> You lost (or explicitly removed) the = 0 here, but that's okay.
Explicitly dropped (C89 defaults enums to start from 0, and I tend to
favor minimal code solutions). Besides, and since this enum is not
exported, it doesn't matter _what_ we start with, as long as the values
are distinct, so the compiler default is as good as any explicit setting.
>
>> + VSH_OT_STRING, /* string option */
>> + VSH_OT_INT, /* int option */
>> + VSH_OT_DATA, /* string data (as non-option) */
>> + VSH_OT_ARGV /* remaining arguments, opt->name should be "" */
>> } vshCmdOptType;
>>
>
> ACK.
> You really try to cover all edge cases here :)
Thanks - I sure tried! (although I didn't use gcov, so I probably missed
some). I've pushed the series now.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list