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

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



On 12/08/2011 07:30 AM, ajia redhat com wrote:
From: Alex Jia<ajia 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 redhat com>
---

Your patch failed to apply as the context is ambigous with a function not far away from this. Also 3-way merge failed due to invalid git hashes. You probably had more patches on a branch which are not upstream.

Anyways, thanks for finding this. I'm going to push a fix based on your patch.



>From 857fb46a32739a1a8426dc8bb4f91c65b2982b5e Mon Sep 17 00:00:00 2001
Message-Id: <857fb46a32739a1a8426dc8bb4f91c65b2982b5e 1323336084 git pkrempa redhat com>
From: Peter Krempa <pkrempa redhat com>
Date: Thu, 8 Dec 2011 10:09:59 +0100
Subject: [PATCH] virsh: return correct value from cmdDomIfGetLink

Reported by Alex Jia <ajia redhat com>. Function cmdDomIfGetLink did not
set a success return value on success path.

Signed-off-by: Alex Jia<ajia redhat com>
---
 tools/virsh.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index a51478f..f7067cd 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1567,6 +1567,7 @@ hit:
     /* attribute not found */
     vshPrint(ctl, "%s default", iface);

+    ret = true;
 cleanup:
     xmlXPathFreeObject(obj);
     xmlXPathFreeContext(ctxt);
-- 
1.7.3.4


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