[libvirt] [PATCH 1/2] qemu: return error condition

Eric Blake eblake at redhat.com
Fri Jul 8 15:38:15 UTC 2011


On 07/08/2011 09:13 AM, Michael Santos wrote:
> ---
>  src/qemu/qemu_bridge_filter.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_bridge_filter.c b/src/qemu/qemu_bridge_filter.c
> index f700631..03ed284 100644
> --- a/src/qemu/qemu_bridge_filter.c
> +++ b/src/qemu/qemu_bridge_filter.c
> @@ -78,6 +78,7 @@ networkAllowMacOnPort(struct qemud_driver *driver,
>          virReportSystemError(err,
>                       _("failed to add ebtables rule to allow routing to '%s'"),
>                               ifname);
> +        return err;
>      }
>  
>      return 0;

Good catch.  However, we now have a problem - networkAlloMacOnPort is
issuing an error, and the caller, qemuPhysIfaceConnect, will now
overwrite that error.  Furthermore, qemuPhysIfaceConnect is not doing
any special return handling on error, either.

I think we need a v2 of this patch that propagates the error return all
the way up the call chain, while still only emitting the error once.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110708/bb1d335d/attachment-0001.sig>


More information about the libvir-list mailing list