mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
vshCmdOptDef: Remove unused 'flags' member
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>
This commit is contained in:
parent
4b44113d7b
commit
de9dfeee9a
@ -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}
|
||||
|
@ -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}
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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") \
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user