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

Re: [Xen-devel] [PATCH 1/3] libxl_qmp, Introduce libxl__qmp_insert_cdrom.



Anthony PERARD writes ("[PATCH 1/3] libxl_qmp, Introduce 
libxl__qmp_insert_cdrom."):
> This function can eject or change the CDROM for a guest that use qemu-xen as a
> device-model.
...
> +int libxl__qmp_insert_cdrom(libxl__gc *gc, int domid,
> +                            const libxl_device_disk *disk)
> +{
> +    libxl__qmp_handler *qmp = NULL;
> +    char *device_id;
> +    int rc = 0;
> +
> +    device_id = libxl__sprintf(gc, "ide-%s", disk->vdev);
> +    if (!device_id)
> +        return ERROR_NOMEM;

Use GCSPRINTF (and ditch the error check) ?

> +    qmp = libxl__qmp_initialize(gc, domid);
> +    if (!qmp)
> +        return ERROR_FAIL;

AIUI qemu only supports one concurrent user of its qmp.  You don't
seem to have anything here to deal with that.  Personally I think that
needs to be fixed in qemu.

> +    if (disk->format == LIBXL_DISK_FORMAT_EMPTY) {
> +        libxl__json_object *args = NULL;
> +
> +        args = qmp_parameters_add_string(gc, NULL, "device", device_id);

What is this function ?  I don't seem to be able to find it.  Perhaps
it's in another patch series of yours ?

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.