]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Inline VIRSH_COMMON_OPT_DOMAIN_OT_STRING macro
authorPeter Krempa <pkrempa@redhat.com>
Thu, 14 Mar 2024 21:09:06 +0000 (22:09 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:29 +0000 (14:24 +0200)
Upcoming patches will need to tweak some of the properties of the
command. Since the macro is used in just two places expand it inline.

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

index 2ff7f7b81c25d0107ed16bf5376dd3c76106d686..73b00f3bb2f5430dd9e720548e336f0f73b3cb3b 100644 (file)
@@ -865,8 +865,11 @@ static const vshCmdInfo info_event = {
 };
 
 static const vshCmdOptDef opts_event[] = {
-    VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("filter by domain name, id or uuid"),
-                                      0, 0),
+    {.name = "domain",
+     .type = VSH_OT_STRING,
+     .help = N_("filter by domain name, id or uuid"),
+     .completer = virshDomainNameCompleter,
+    },
     {.name = "event",
      .type = VSH_OT_STRING,
      .completer = virshDomainEventNameCompleter,
index cd378286605463999d4e904a0a15746f580ae72b..0bf4d524b0f7e1768e6a612a5c3ad723ca304535 100644 (file)
@@ -9826,8 +9826,11 @@ static const vshCmdInfo info_qemu_monitor_event = {
 };
 
 static const vshCmdOptDef opts_qemu_monitor_event[] = {
-    VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("filter by domain name, id or uuid"),
-                                      0, 0),
+    {.name = "domain",
+     .type = VSH_OT_STRING,
+     .help = N_("filter by domain name, id or uuid"),
+     .completer = virshDomainNameCompleter,
+    },
     {.name = "event",
      .type = VSH_OT_STRING,
      .help = N_("filter by event name")
@@ -10322,7 +10325,12 @@ static const vshCmdOptDef opts_domxmltonative[] = {
      .required = true,
      .help = N_("target config data type format")
     },
-    VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(VSH_OFLAG_REQ_OPT, 0),
+    {.name = "domain",
+     .type = VSH_OT_STRING,
+     .flags = VSH_OFLAG_REQ_OPT,
+     .help = N_("domain name, id or uuid"),
+     .completer = virshDomainNameCompleter,
+    },
     {.name = "xml",
      .type = VSH_OT_STRING,
      .completer = virshCompletePathLocalExisting,
index 1114c1572be7f7b90841dc8c0f8010e3b73adf3f..ff0cf80911dc8647ae0888b6cb5da42c058d42dc 100644 (file)
      .help = _helpstr \
     }
 
-#define VIRSH_COMMON_OPT_DOMAIN_OT_STRING(_helpstr, oflags, cflags) \
-    {.name = "domain", \
-     .type = VSH_OT_STRING, \
-     .flags = oflags, \
-     .help = _helpstr, \
-     .completer = virshDomainNameCompleter, \
-     .completer_flags = cflags, \
-    }
-
-#define VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL(oflags, cflags) \
-    VIRSH_COMMON_OPT_DOMAIN_OT_STRING(N_("domain name, id or uuid"), \
-                                      oflags, cflags)
-
 typedef struct _virshControl virshControl;
 
 typedef struct _virshCtrlData virshCtrlData;