From 4be3b50dcc61835bdcf36502c9bdb3fa1700896e Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Tue, 8 May 2018 22:20:32 +0800 Subject: [PATCH] virsh: Create macros for VSH_OT_STRING "domain" option Signed-off-by: Lin Ma Signed-off-by: Michal Privoznik --- tools/virsh.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/virsh.h b/tools/virsh.h index d977fe30df..5caaeb9b7e 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -110,6 +110,17 @@ .help = _helpstr \ } +# define VIRSH_COMMON_OPT_DOMAIN_OT_STRING(_helpstr, cflags) \ + {.name = "domain", \ + .type = VSH_OT_STRING, \ + .help = _helpstr, \ + .completer = virshDomainNameCompleter, \ + .completer_flags = cflags, \ + } + +# define VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(cflags) \ + VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("domain name, id or uuid"), cflags) + typedef struct _virshControl virshControl; typedef virshControl *virshControlPtr;