[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/3] virsh: add support for accepting arbitrary argv



2010/10/15 Eric Blake <eblake redhat com>:
> * tools/virsh.c (vshCmdOptType): Add VSH_OT_ARGV.  Delete
> unused VSH_OT_NONE.
> (vshCmddefGetData): Special case new opt flag.
> (vshCmddefHelp): Display help for argv.
> (vshCommandOptArgv): New function.
> ---
>
> Here's the completed series.
>
>  tools/virsh.c |   75 ++++++++++++++++++++++++++++++++++++++++++++------------
>  1 files changed, 59 insertions(+), 16 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 89c2e1e..54b1bbc 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -119,11 +119,11 @@ typedef enum {
>  * vshCmdOptType - command option type
>  */
>  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.

> +    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.

Matthias


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]