From 90396d795ab4ab8d49dbb7b42a49bc7da0aab8fe Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Tue, 8 May 2018 22:20:35 +0800 Subject: [PATCH] virsh: Create macros for VSH_OT_ARGV "domain" option Signed-off-by: Lin Ma Signed-off-by: Michal Privoznik --- tools/virsh.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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;