[PATCH] virsh: correct the cmdDomIfGetLink function return value error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alex Jia <ajia@xxxxxxxxxx>

* 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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]