From: Lin Ma Date: Tue, 8 May 2018 14:20:35 +0000 (+0800) Subject: virsh: Create macros for VSH_OT_ARGV "domain" option X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=90396d795ab4ab8d49dbb7b42a49bc7da0aab8fe;p=libvirt.git virsh: Create macros for VSH_OT_ARGV "domain" option Signed-off-by: Lin Ma Signed-off-by: Michal Privoznik --- diff --git a/tools/virsh.h b/tools/virsh.h index 5caaeb9b7e..e164aabcee 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;