From 162b184d0e3c369f784a600c960d4ead7323605a Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 5 Mar 2024 15:22:35 +0100 Subject: [PATCH] virsh: Inline only use of VIRSH_COMMON_OPT_DOMAIN_OT_ARGV macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's just one command taking a list of domains as argument, thus declare it inline. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tools/virsh-domain-monitor.c | 6 +++++- tools/virsh.h | 12 ------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 277eb71342..7a25318bbd 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -2048,7 +2048,11 @@ static const vshCmdOptDef opts_domstats[] = { .type = VSH_OT_BOOL, .help = N_("report only stats that are accessible instantly"), }, - VIRSH_COMMON_OPT_DOMAIN_OT_ARGV(N_("list of domains to get stats for"), 0), + {.name = "domain", + .type = VSH_OT_ARGV, + .help = N_("list of domains to get stats for"), + .completer = virshDomainNameCompleter, + }, {.name = NULL} }; diff --git a/tools/virsh.h b/tools/virsh.h index 6acefa7f9d..877b290e3a 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -119,18 +119,6 @@ VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("domain name, id or uuid"), \ oflags, 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 struct _virshCtrlData virshCtrlData;