]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Inline VIRSH_COMMON_OPT_NETWORK_OT_STRING macro
authorPeter Krempa <pkrempa@redhat.com>
Thu, 14 Mar 2024 21:22:08 +0000 (22:22 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:29 +0000 (14:24 +0200)
The macro is used in just one place and the definition of the option is
going to be modified. Inline the macro.

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

index 597e3d4530c17e7b38a70faefb2d8cdf6596403d..240d10eea78ea00e431f50a8dbf28f8f8d866dc2 100644 (file)
 #define VIRSH_COMMON_OPT_NETWORK_FULL(cflags) \
     VIRSH_COMMON_OPT_NETWORK(N_("network name or uuid"), cflags)
 
-#define VIRSH_COMMON_OPT_NETWORK_OT_STRING(_helpstr, cflags) \
-    {.name = "network", \
-     .type = VSH_OT_STRING, \
-     .help = _helpstr, \
-     .completer = virshNetworkNameCompleter, \
-     .completer_flags = cflags, \
-    }
-
-#define VIRSH_COMMON_OPT_NETWORK_OT_STRING_FULL(cflags) \
-    VIRSH_COMMON_OPT_NETWORK_OT_STRING(N_("network name or uuid"), cflags)
-
 #define VIRSH_COMMON_OPT_NETWORK_PORT(cflags) \
     {.name = "port", \
      .type = VSH_OT_STRING, \
@@ -1587,7 +1576,11 @@ static const vshCmdInfo info_network_event = {
 };
 
 static const vshCmdOptDef opts_network_event[] = {
-    VIRSH_COMMON_OPT_NETWORK_OT_STRING(N_("filter by network name or uuid"), 0),
+    {.name = "network",
+     .type = VSH_OT_STRING,
+     .help = N_("filter by network name or uuid"),
+     .completer = virshNetworkNameCompleter,
+    },
     {.name = "event",
      .type = VSH_OT_STRING,
      .completer = virshNetworkEventNameCompleter,