]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Create macros for VSH_OT_ARGV "domain" option
authorLin Ma <lma@suse.com>
Tue, 8 May 2018 14:20:35 +0000 (22:20 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 10 May 2018 08:01:15 +0000 (10:01 +0200)
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh.h

index 5caaeb9b7e232ca5d9190fea777dd36a69dfcf7a..e164aabcee2343561a05b796acbaccf16f87f610 100644 (file)
 # 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;