]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vshCmdOptDef: Remove unused 'flags' member
authorPeter Krempa <pkrempa@redhat.com>
Mon, 11 Mar 2024 12:22:23 +0000 (13:22 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:30 +0000 (14:24 +0200)
Drop the last enum member VSH_OFLAG_NONE and remove the 'flags' variable
from vshCmdOptDef.

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

index eec97b7d59fe5d96389786d9f2100070eb2f27f0..599ae71e7a1e1ba9feebb359d5760804847f4f7e 100644 (file)
@@ -2222,17 +2222,14 @@ static const vshCmdOptDef opts_domifaddr[] = {
     {.name = "interface",
      .type = VSH_OT_STRING,
      .positional = true,
-     .flags = VSH_OFLAG_NONE,
      .completer = virshDomainInterfaceCompleter,
      .help = N_("network interface name")},
     {.name = "full",
      .type = VSH_OT_BOOL,
-     .flags = VSH_OFLAG_NONE,
      .help = N_("always display names and MACs of interfaces")},
     {.name = "source",
      .type = VSH_OT_STRING,
      .unwanted_positional = true,
-     .flags = VSH_OFLAG_NONE,
      .completer = virshDomainInterfaceAddrSourceCompleter,
      .help = N_("address source: 'lease', 'agent', or 'arp'")},
     {.name = NULL}
index 1ba38629ac1881abc6ab292c459c5b41cc3619cf..694958f990b3e24740ffc7c556eb65f753d4b69d 100644 (file)
@@ -2290,7 +2290,6 @@ static const vshCmdOptDef opts_blockcopy[] = {
     {.name = "format",
      .type = VSH_OT_STRING,
      .unwanted_positional = true,
-     .flags = VSH_OFLAG_NONE,
      .completer = virshDomainStorageFileFormatCompleter,
      .help = N_("format of the destination file")
     },
@@ -5032,7 +5031,6 @@ static const vshCmdOptDef opts_schedinfo[] = {
     {.name = "set",
      .type = VSH_OT_ARGV,
      .positional = true,
-     .flags = VSH_OFLAG_NONE,
      .help = N_("parameter=value")
     },
     {.name = NULL}
@@ -5345,7 +5343,6 @@ static const vshCmdOptDef opts_dump[] = {
     },
     {.name = "format",
      .type = VSH_OT_STRING,
-     .flags = VSH_OFLAG_NONE,
      .unwanted_positional = true,
      .completer = virshDomainCoreDumpFormatCompleter,
      .help = N_("specify the format of memory-only dump")
@@ -11874,7 +11871,6 @@ static const vshCmdOptDef opts_domhostname[] = {
     {.name = "source",
      .type = VSH_OT_STRING,
      .unwanted_positional = true,
-     .flags = VSH_OFLAG_NONE,
      .completer = virshDomainHostnameSourceCompleter,
      .help = N_("address source: 'lease' or 'agent'")},
     {.name = NULL}
index 065e59c3a15cc1e0524cd25ec753b794d784ca03..e6552cbe57b363143312926d1fa8980c670fbedd 100644 (file)
@@ -1700,7 +1700,6 @@ static const vshCmdOptDef opts_network_dhcp_leases[] = {
     {.name = "mac",
      .type = VSH_OT_STRING,
      .unwanted_positional = true,
-     .flags = VSH_OFLAG_NONE,
      .help = N_("MAC address"),
      .completer = virshNetworkDhcpMacCompleter,
     },
index aff1201ef73af9360b8b286fb6b3dec169ed4a18..24e7bb9bf5ffd16cff8a37841a6e61e0e3d58bfc 100644 (file)
 #define VIRSH_COMMON_OPT_POOL_BUILD \
     {.name = "build", \
      .type = VSH_OT_BOOL, \
-     .flags = 0, \
      .help = N_("build the pool as normal") \
     }
 
 #define VIRSH_COMMON_OPT_POOL_NO_OVERWRITE \
     {.name = "no-overwrite", \
      .type = VSH_OT_BOOL, \
-     .flags = 0, \
      .help = N_("do not overwrite any existing data") \
     }
 
 #define VIRSH_COMMON_OPT_POOL_OVERWRITE \
     {.name = "overwrite", \
      .type = VSH_OT_BOOL, \
-     .flags = 0, \
      .help = N_("overwrite any existing data") \
     }
 
index a12f0a635d71f39deaf636cebecc6d2673bf7b44..7305160ed920216a7b8f8a50fc77a78f68a1745e 100644 (file)
@@ -393,7 +393,6 @@ vshCmddefCheckInternals(vshControl *ctl,
                 opt->positional ||
                 opt->unwanted_positional ||
                 opt->completer ||
-                opt->flags ||
                 !opt->help) {
                 vshError(ctl, "parameter '%s' of command '%s' has incorrect alias option",
                          opt->name, cmd->name);
index 1921645fca1cd07a513cb4c198b2598d90812d1f..f06d65407d1a8de1986a49eec56174ed9440974e 100644 (file)
@@ -93,13 +93,6 @@ typedef enum {
     VSH_OT_ALIAS,    /* alternate spelling for a later argument */
 } vshCmdOptType;
 
-/*
- * Command Option Flags
- */
-enum {
-    VSH_OFLAG_NONE     = 0,        /* without flags */
-};
-
 /* forward declarations */
 typedef struct _vshClientHooks vshClientHooks;
 typedef struct _vshCmd vshCmd;
@@ -138,7 +131,6 @@ struct _vshCmdOptDef {
      * 'unwanted_positional' flag. New options must not use this flag */
     bool unwanted_positional;
 
-    unsigned int flags;         /* flags */
     bool allowEmpty;            /* allow empty string */
     const char *help;           /* non-NULL help string; or for VSH_OT_ALIAS
                                  * the name of a later public option */