{.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}
{.name = "format",
.type = VSH_OT_STRING,
.unwanted_positional = true,
- .flags = VSH_OFLAG_NONE,
.completer = virshDomainStorageFileFormatCompleter,
.help = N_("format of the destination file")
},
{.name = "set",
.type = VSH_OT_ARGV,
.positional = true,
- .flags = VSH_OFLAG_NONE,
.help = N_("parameter=value")
},
{.name = NULL}
},
{.name = "format",
.type = VSH_OT_STRING,
- .flags = VSH_OFLAG_NONE,
.unwanted_positional = true,
.completer = virshDomainCoreDumpFormatCompleter,
.help = N_("specify the format of memory-only dump")
{.name = "source",
.type = VSH_OT_STRING,
.unwanted_positional = true,
- .flags = VSH_OFLAG_NONE,
.completer = virshDomainHostnameSourceCompleter,
.help = N_("address source: 'lease' or 'agent'")},
{.name = NULL}
{.name = "mac",
.type = VSH_OT_STRING,
.unwanted_positional = true,
- .flags = VSH_OFLAG_NONE,
.help = N_("MAC address"),
.completer = virshNetworkDhcpMacCompleter,
},
#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") \
}
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);
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;
* '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 */