[libvirt] [PATCH] fix device hotplug

Guido Günther agx at sigxcpu.org
Thu Dec 18 14:45:04 UTC 2008


On Thu, Dec 18, 2008 at 10:51:04AM +0000, Daniel P. Berrange wrote:
> On Thu, Dec 18, 2008 at 10:26:07AM +0100, Guido G?nther wrote:
> > Hi,
> > due to some restructuring we free the device structure so devices are
> > plugged correctly but "dumpxml" fails since the dev structure is already
> 
> This is a rather over complicated way of fixing it. Why not just
> do:
> 
>   < cleanup:
>   <    virDomainDeviceDefFree(dev)
>   -----------------
>   > cleanup:
>   >    if (ret < 0)
>   >        virDomainDeviceDefFree(dev);
I somehow prefer to keep the cleanup and error targets different, but
you're right the above is much simpler. Updated patch attached.
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-device-hotplug.patch
Type: text/x-diff
Size: 678 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081218/add54e3d/attachment-0001.bin>


More information about the libvir-list mailing list