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