mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Annotate some optional arguments as positional
Make certain optional arguments truly positional in cases when it makes semantic sense. Previously it wasn't possible to have optional positional arguments, but the parser filled them regardless, thus this preserves functionality. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -385,6 +385,7 @@ static const vshCmdOptDef opts_domblkinfo[] = {
|
||||
VIRSH_COMMON_OPT_DOMAIN_FULL(0),
|
||||
{.name = "device",
|
||||
.type = VSH_OT_STRING,
|
||||
.positional = true,
|
||||
.completer = virshDomainDiskTargetCompleter,
|
||||
.help = N_("block device")
|
||||
},
|
||||
@@ -865,6 +866,7 @@ static const vshCmdOptDef opts_domblkstat[] = {
|
||||
{.name = "device",
|
||||
.type = VSH_OT_STRING,
|
||||
.flags = VSH_OFLAG_EMPTY_OK,
|
||||
.positional = true,
|
||||
.completer = virshDomainDiskTargetCompleter,
|
||||
.help = N_("block device")
|
||||
},
|
||||
@@ -2219,6 +2221,7 @@ static const vshCmdOptDef opts_domifaddr[] = {
|
||||
VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE),
|
||||
{.name = "interface",
|
||||
.type = VSH_OT_STRING,
|
||||
.positional = true,
|
||||
.flags = VSH_OFLAG_NONE,
|
||||
.completer = virshDomainInterfaceCompleter,
|
||||
.help = N_("network interface name")},
|
||||
|
||||
Reference in New Issue
Block a user