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

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

 



2010/10/15 Eric Blake <eblake@xxxxxxxxxx>:
> * 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]