mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
virsh: Add interface mac completion to iface-name command
Signed-off-by: Lin Ma <lma@suse.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9b751469ea
commit
bfb82029a1
@ -73,3 +73,13 @@ virshInterfaceNameCompleter(vshControl *ctl,
|
||||
{
|
||||
return virshInterfaceStringHelper(ctl, cmd, flags, virInterfaceGetName);
|
||||
}
|
||||
|
||||
|
||||
char **
|
||||
virshInterfaceMacCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
return virshInterfaceStringHelper(ctl, cmd, flags,
|
||||
virInterfaceGetMACString);
|
||||
}
|
||||
|
@ -25,3 +25,7 @@
|
||||
char ** virshInterfaceNameCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags);
|
||||
|
||||
char ** virshInterfaceMacCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags);
|
||||
|
@ -404,6 +404,7 @@ static const vshCmdOptDef opts_interface_name[] = {
|
||||
{.name = "interface",
|
||||
.type = VSH_OT_DATA,
|
||||
.flags = VSH_OFLAG_REQ,
|
||||
.completer = virshInterfaceMacCompleter,
|
||||
.help = N_("interface mac")
|
||||
},
|
||||
{.name = NULL}
|
||||
|
Loading…
Reference in New Issue
Block a user