[libvirt] PATCH: Ensure errors are guarenteed reported in virConnectOpen

Richard W.M. Jones rjones at redhat.com
Wed Aug 20 13:22:58 UTC 2008


On Tue, Aug 19, 2008 at 11:35:18AM +0100, Daniel P. Berrange wrote:
> The guarenteed correct solution is actually rather simple
> 
>  - Always report errors against the virConnect object, even in the driver
>    open method
> 
>  - In the cleanup patch of do_open() in libvirt.c, if no global error is
>    set, copy the error from the virConnect object's virError, into the 
>    global virError.

+1 , although unfortunately this isn't thread-safe.  Nothing can be
thread-safe unless we change the API.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the libvir-list mailing list