On Thu, Oct 23, 2008 at 06:25:37PM +0200, Guido Günther wrote: > Hi Daniel, > On Tue, Oct 21, 2008 at 03:25:25PM +0200, Daniel Veillard wrote: > [..snip..] > > Those are just stylistic issues, I can apply the patch with those > > changed if you wish if you don't have time for a new patch, > Thanks for your comments. Updated version attached. I basically removed > the union in favour of a single slotnum variable and cleaned up the > error messages. > As Daniel P. pointed out, the situation isn't ideal since we can only > hotremove disks added during the same session since qemu has no real > notion of "reidentifying" the disks that were passed on the command > line, this can hopefully be resolved in the future with a little help > from qemu. Oops I had forgotten about that patch ! > Cheers, [...] > +static int qemudDomainDetachDevice(virDomainPtr dom, > + const char *xml) { > + struct qemud_driver *driver = (struct qemud_driver *)dom->conn->privateData; > + virDomainObjPtr vm = virDomainFindByUUID(&driver->domains, dom->uuid); > + virDomainDeviceDefPtr dev; > + int ret = 0; > + > + if (!vm) { > + qemudReportError(dom->conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, > + "%s", _("no domain with matching uuid")); > + return -1; > + } > + > + if (!virDomainIsActive(vm)) { > + qemudReportError(dom->conn, dom, NULL, VIR_ERR_INTERNAL_ERROR, > + "%s", _("cannot attach device on inactive domain")); > + return -1; > + } > + > + dev = virDomainDeviceDefParse(dom->conn, vm->def, xml); > + if (dev == NULL) { > + return -1; > + } Applied, I just had to modify the above function since the virDomainDeviceDefParse no take the extra driver->caps argument. Commited, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list