On Fri, May 04, 2018 at 17:25:27 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma <[email protected]> > --- > tools/virsh-domain-monitor.c | 3 +++ > tools/virsh-domain.c | 3 +++ > tools/virsh-snapshot.c | 3 +++ > tools/virsh.h | 9 +++++++++ > 4 files changed, 18 insertions(+) > > diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c > index 8ad651626b..e4a21534cb 100644 > --- a/tools/virsh-domain-monitor.c > +++ b/tools/virsh-domain-monitor.c > @@ -46,6 +46,9 @@ > #define VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(cflags) \ > VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("domain name, id or uuid"), cflags) > > +#define VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL(cflags) \ > + VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("domain name, id or uuid"), cflags)
All of these defined here are unused (even in the other patches in this
series), so what's the point of adding them?
> +
> VIR_ENUM_DECL(virshDomainIOError)
> VIR_ENUM_IMPL(virshDomainIOError,
> VIR_DOMAIN_DISK_ERROR_LAST,
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 689f9d686b..89aefbf86a 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -71,6 +71,9 @@
> #define VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(cflags) \
> VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("domain name, id or uuid"), cflags)
>
> +#define VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL(cflags) \
> + VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("domain name, id or uuid"), cflags)
> +
> #define VIRSH_COMMON_OPT_DOMAIN_PERSISTENT \
> {.name = "persistent", \
> .type = VSH_OT_BOOL, \
> diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
> index 3d86ac84d1..0c86b6c950 100644
> --- a/tools/virsh-snapshot.c
> +++ b/tools/virsh-snapshot.c
> @@ -48,6 +48,9 @@
> #define VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(cflags) \
> VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("domain name, id or uuid"), cflags)
>
> +#define VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL(cflags) \
> + VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("domain name, id or uuid"), cflags)
> +
> /* Helper for snapshot-create and snapshot-create-as */
Also all of them have the same docs string so I really don't know why we
need to define them in every file separately ...
> static bool
> virshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer,
> diff --git a/tools/virsh.h b/tools/virsh.h
> index 9dcf104cc4..a33d108b2d 100644
> --- a/tools/virsh.h
> +++ b/tools/virsh.h
> @@ -115,6 +115,15 @@
> .completer_flags = cflags, \
> }
>
> +# define VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(_helpstr, cflags) \
> + {.name = "domain", \
> + .type = VSH_OT_ARGV, \
> + .flags = VSH_OFLAG_NONE, \
> + .help = _helpstr, \
> + .completer = virshDomainNameCompleter, \
> + .completer_flags = cflags, \
> + }
> +
> typedef struct _virshControl virshControl;
> typedef virshControl *virshControlPtr;
>
> --
> 2.15.1
>
> --
> libvir-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/libvir-list
signature.asc
Description: PGP signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
