[libvirt] [PATCH v2 07/12] virsh: Create macros for VSH_OT_ARGV "domain" option

Lin Ma posted 12 patches 7 years ago
[libvirt] [PATCH v2 07/12] virsh: Create macros for VSH_OT_ARGV "domain" option
Posted by Lin Ma 7 years ago
Signed-off-by: Lin Ma <lma@suse.com>
---
 tools/virsh.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tools/virsh.h b/tools/virsh.h
index b1b641bc41..4353ff46d4 100644
--- a/tools/virsh.h
+++ b/tools/virsh.h
@@ -121,6 +121,18 @@
 #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(_helpstr, cflags) \
+    {.name = "domain", \
+     .type = VSH_OT_ARGV, \
+     .flags = VSH_OFLAG_NONE, \
+     .help = _helpstr, \
+     .completer = virshDomainNameCompleter, \
+     .completer_flags = cflags, \
+    }
+
+#define VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL(cflags) \
+    VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("domain name, id or uuid"), cflags)
+
 typedef struct _virshControl virshControl;
 typedef virshControl *virshControlPtr;
 
-- 
2.15.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 07/12] virsh: Create macros for VSH_OT_ARGV "domain" option
Posted by Michal Privoznik 7 years ago
On 05/08/2018 04:20 PM, Lin Ma wrote:
> Signed-off-by: Lin Ma <lma@suse.com>
> ---
>  tools/virsh.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tools/virsh.h b/tools/virsh.h
> index b1b641bc41..4353ff46d4 100644
> --- a/tools/virsh.h
> +++ b/tools/virsh.h
> @@ -121,6 +121,18 @@
>  #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(_helpstr, cflags) \
> +    {.name = "domain", \
> +     .type = VSH_OT_ARGV, \
> +     .flags = VSH_OFLAG_NONE, \
> +     .help = _helpstr, \
> +     .completer = virshDomainNameCompleter, \> +     .completer_flags = cflags, \
> +    }
> +
> +#define VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL(cflags) \

Again, missing space.

ACK with that fixed.

Michal

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