Re: [PATCH 3/3] Add disk attach/detach support to libxl driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch 18 Mai 2011 10:06:38 schrieb Markus GroÃ:
> Based on the device attach/detach code from the QEMU driver.
> ---
>  src/libxl/libxl_driver.c |  519 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 519 insertions(+), 0 deletions(-)
> 
> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index a14ace1..a056be9 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c

> +
> +    if (flags & VIR_DOMAIN_DEVICE_MODIFY_LIVE) {
> +        /* If dev exists it was created to modify the domain config. Free it, */

s/,/./

> +        virDomainDeviceDefFree(dev);
> +        if (!(dev = virDomainDeviceDefParse(driver->caps, vm->def, xml,
> +                                            VIR_DOMAIN_XML_INACTIVE)))
> +            goto cleanup;
> +
> +        switch (action) {
> +            case LIBXL_DEVICE_ATTACH:
> +                ret = libxlDomainAttachDeviceLive(priv, vm, dev);
> +                break;
> +            case LIBXL_DEVICE_DETACH:
> +                ret = libxlDomainDetachDeviceLive(priv, vm, dev);
> +                break;
> +            case LIBXL_DEVICE_UPDATE:
> +                ret = libxlDomainUpdateDeviceLive(priv, vm, dev);
> +            default:
> +                libxlError(VIR_ERR_INTERNAL_ERROR,
> +                           _("unknown domain modify action %d"), action);
> +                break;
> +        }

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]