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

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> --- 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

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.

On 12/08/2011 05:25 PM, Peter Krempa wrote:
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.
Peter, thanks, you probably need to ACK '[libvirt][PATCH] virsh: plug memory leak on cmdBlkdeviotune() sucessful path' and '[libvirt][PATCH] virsh: plug memory leak on cmdDomIfGetLink() sucessful path' firstly, and Osier have given a ACKed. Alex

On 12/08/2011 10:31 AM, Alex Jia wrote:
On 12/08/2011 05:25 PM, Peter Krempa wrote:
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.
Peter, thanks, you probably need to ACK '[libvirt][PATCH] virsh: plug memory leak on cmdBlkdeviotune() sucessful path' and '[libvirt][PATCH] virsh: plug memory leak on cmdDomIfGetLink() sucessful path' firstly, and Osier have given a ACKed.
Alex
I still couldn't apply your patch even after Eric pushed your previous patches, so I went ahead and pushed the recreated version mentioned in my previous mail in this thread. Peter
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Peter, it's okay for me, thanks. Regards, Alex ----- Original Message ----- From: "Peter Krempa" <pkrempa@redhat.com> To: "Alex Jia" <ajia@redhat.com> Cc: libvir-list@redhat.com Sent: Friday, December 9, 2011 7:45:50 PM Subject: Re: [libvirt] [PATCH] virsh: correct the cmdDomIfGetLink function return value error On 12/08/2011 10:31 AM, Alex Jia wrote:
On 12/08/2011 05:25 PM, Peter Krempa wrote:
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.
Peter, thanks, you probably need to ACK '[libvirt][PATCH] virsh: plug memory leak on cmdBlkdeviotune() sucessful path' and '[libvirt][PATCH] virsh: plug memory leak on cmdDomIfGetLink() sucessful path' firstly, and Osier have given a ACKed.
Alex
I still couldn't apply your patch even after Eric pushed your previous patches, so I went ahead and pushed the recreated version mentioned in my previous mail in this thread. Peter
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (3)
-
ajia@redhat.com
-
Alex Jia
-
Peter Krempa