[libvirt] [PATCH v2 14/14] libxl: add tablet/mouse input device support
Jim Fehlig
jfehlig at suse.com
Wed Jul 3 22:38:36 UTC 2013
On 06/12/2013 07:54 PM, Marek Marczykowski-Górecki wrote:
> Signed-off-by: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
> ---
> src/libxl/libxl_conf.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> index 278c5e5..61c370f 100644
> --- a/src/libxl/libxl_conf.c
> +++ b/src/libxl/libxl_conf.c
> @@ -481,6 +481,36 @@ libxlMakeDomBuildInfo(libxlDriverPrivatePtr driver,
> }
> }
>
> + /* Only the first one is used - b_info->u.hvm.usbdevice doesn't have
> + * space for more (until xen 4.3) */
Do you mean xen 4.4? 4.3 is done.
> + if (def->ninputs) {
> + if (def->ninputs > 1) {
> + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> + _("This driver supports only one input device"));
I suggest "libxenlight only supports one input device".
> + goto error;
> + }
> + if (def->inputs[0]->bus != VIR_DOMAIN_INPUT_BUS_USB) {
> + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> + _("libxenlight support only USB input for now"));
And here, "libxenlight only supports USB input devices".
> + goto error;
> + }
> +
> + switch (def->inputs[0]->type) {
> + case VIR_DOMAIN_INPUT_TYPE_MOUSE:
> + free(b_info->u.hvm.usbdevice);
VIR_FREE().
> + b_info->u.hvm.usbdevice = strdup("mouse");
VIR_STRDUP().
> + break;
> + case VIR_DOMAIN_INPUT_TYPE_TABLET:
> + free(b_info->u.hvm.usbdevice);
> + b_info->u.hvm.usbdevice = strdup("tablet");
Same here.
Regards,
Jim
> + break;
> + default:
> + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> + _("Unknown input device type"));
> + goto error;
> + }
> + }
> +
> /*
> * The following comment and calculation were taken directly from
> * libxenlight's internal function libxl_get_required_shadow_memory():
More information about the libvir-list
mailing list