mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
virsh: require --mac to avoid detach-interface ambiguity
bugfix for https://bugzilla.redhat.com/show_bug.cgi?id=671050 virsh simply refutes to detach-interface in case when multiple interfaces are attached and --mac is not specified.
This commit is contained in:
parent
75da8b8505
commit
cee47aace1
3
AUTHORS
3
AUTHORS
@ -23,7 +23,7 @@ The primary maintainers and people with commit access rights:
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
John Levon <john.levon@sun.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Jiri Denemark <jdenemar@redhat.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
@ -144,6 +144,7 @@ Patches have also been contributed by:
|
||||
Paweł Krześniak <pawel.krzesniak@gmail.com>
|
||||
Kay Schubert <kayegypt@web.de>
|
||||
Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -8557,6 +8557,12 @@ cmdDetachInterface(vshControl *ctl, const vshCmd *cmd)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((!mac) && (obj->nodesetval->nodeNr > 1)) {
|
||||
vshError(ctl, _("Domain has %d interfaces. Please specify which one "
|
||||
"to detach using --mac"), obj->nodesetval->nodeNr);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!mac)
|
||||
goto hit;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user