]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Inline only use of VIRSH_COMMON_OPT_DOMAIN_OT_ARGV macro
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Mar 2024 14:22:35 +0000 (15:22 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 13 Mar 2024 14:02:52 +0000 (15:02 +0100)
There's just one command taking a list of domains as argument, thus
declare it inline.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-domain-monitor.c
tools/virsh.h

index 277eb71342d1fad69c18ae5bb83522874b2c5afd..7a25318bbdeb2580cc9b600503c44af2dfa69f58 100644 (file)
@@ -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}
 };
 
index 6acefa7f9d0ddfd698477cd5878524bc2a855251..877b290e3ad120c17b3fdf7a3b08c676e1ec9f38 100644 (file)
     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;