[PATCH 28/28] vshCmdOptDef: Remove unused 'flags' member

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drop the last enum member VSH_OFLAG_NONE and remove the 'flags' variable
from vshCmdOptDef.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tools/virsh-domain-monitor.c | 3 ---
 tools/virsh-domain.c         | 4 ----
 tools/virsh-network.c        | 1 -
 tools/virsh-pool.c           | 3 ---
 tools/vsh.c                  | 1 -
 tools/vsh.h                  | 8 --------
 6 files changed, 20 deletions(-)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index eec97b7d59..599ae71e7a 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -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}
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 1ba38629ac..694958f990 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -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}
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 065e59c3a1..e6552cbe57 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -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,
     },
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index aff1201ef7..24e7bb9bf5 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -37,21 +37,18 @@
 #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") \
     }

diff --git a/tools/vsh.c b/tools/vsh.c
index a12f0a635d..7305160ed9 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -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);
diff --git a/tools/vsh.h b/tools/vsh.h
index 1921645fca..f06d65407d 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -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 */
-- 
2.44.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux