[libvirt] [PATCH] virsh: correct the cmdDomIfGetLink function return value error
ajia at redhat.com
ajia at redhat.com
Thu Dec 8 06:30:46 UTC 2011
From: Alex Jia <ajia at redhat.com>
* tools/virsh.c: Although finding interface with matching mac addr, forgot to
set 'ret' boolean value to 'true'.
* how to reproduce?
% virsh domif-getlink <guest name> <interface mac>
% echo $?
Signed-off-by: Alex Jia <ajia at redhat.com>
---
tools/virsh.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 276e1cc..91c3459 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1538,6 +1538,7 @@ cmdDomIfGetLink (vshControl *ctl, const vshCmd *cmd)
mac = virXMLPropString(cur, "address");
if (STRCASEEQ(mac, iface)){
+ ret = true;
goto hit;
}
}
--
1.7.1
More information about the libvir-list
mailing list