]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Inline VIRSH_COMMON_OPT_FILE_FULL macro
authorPeter Krempa <pkrempa@redhat.com>
Thu, 14 Mar 2024 21:14:31 +0000 (22:14 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:29 +0000 (14:24 +0200)
The macro is used in one place only and the command definition will be
altered. Inline it.

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

index ffb993de79fbefbc8361918b313ffd28f2312656..712db39d35c1e7e01582f14427841a8705a21070 100644 (file)
@@ -1635,8 +1635,11 @@ static const vshCmdInfo info_hypervisor_cpu_baseline = {
 };
 
 static const vshCmdOptDef opts_hypervisor_cpu_baseline[] = {
-    VIRSH_COMMON_OPT_FILE_FULL(N_("file containing XML CPU descriptions"),
-                               false),
+    {.name = "file",
+     .type = VSH_OT_STRING,
+     .completer = virshCompletePathLocalExisting,
+     .help = N_("file containing XML CPU descriptions"),
+    },
     {.name = "virttype",
      .type = VSH_OT_STRING,
      .completer = virshDomainVirtTypeCompleter,
index ff0cf80911dc8647ae0888b6cb5da42c058d42dc..90ffc4bf18228e53218fc5d320a1d59c1c75b739 100644 (file)
 
 /* Use this only for files which are existing and used locally by virsh */
 #define VIRSH_COMMON_OPT_FILE(_helpstr) \
-    VIRSH_COMMON_OPT_FILE_FULL(_helpstr, true)
-
-#define VIRSH_COMMON_OPT_FILE_FULL(_helpstr, required_) \
     {.name = "file", \
      .type = VSH_OT_STRING, \
-     .required = required_, \
-     .positional = required_, \
+     .required = true, \
+     .positional = true, \
      .completer = virshCompletePathLocalExisting, \
      .help = _helpstr \
     }