[libvirt] [PATCH 04/13] Make hotplug use new device_add where possible

Daniel Veillard veillard at redhat.com
Tue Feb 2 14:20:43 UTC 2010


On Mon, Feb 01, 2010 at 06:39:33PM +0000, Daniel P. Berrange wrote:
> Since QEMU startup uses the new -device argument, the hotplug
> code needs todo the same. This converts disk, network and
> host device hotplug to use the device_add command
> 
> * src/qemu/qemu_driver.c: Use new device_add monitor APIs
>   whereever possible
> ---
[...]
> +    if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
> +        ret = qemuMonitorAddDrive(priv->mon, drivestr);
> +        if (ret == 0)
> +            qemuMonitorAddDevice(priv->mon, devstr);
> +            /* XXX remove the drive upon fail */

  Hum, maybe this small TODO should be added, hopefully it's in a later
patch

[...]
> +        if (ret == 0)
> +            ret = qemuMonitorAddDevice(priv->mon,
> +                                       devstr);
> +            /* XXX should call 'drive_del' on error but this does not exist yet */

  ah, that's why ...

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list