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

Re: [Xen-devel] [PATCH v2 2/6] libxl: add backend type and id to vkb



On Tue, Jun 12, 2018 at 04:31:43PM +0300, Oleksandr Grytsov wrote:
> From: Oleksandr Grytsov <oleksandr_grytsov@xxxxxxxx>
[...]
> diff --git a/tools/libxl/libxl_vkb.c b/tools/libxl/libxl_vkb.c
> index 7652ad23ce..beaf17475d 100644
> --- a/tools/libxl/libxl_vkb.c
> +++ b/tools/libxl/libxl_vkb.c
> @@ -14,12 +14,42 @@
>  
>  #include "libxl_internal.h"
>  
> +#include <xen/io/kbdif.h>
> +
>  static int libxl__device_vkb_setdefault(libxl__gc *gc, uint32_t domid,
>                                          libxl_device_vkb *vkb, bool hotplug)
>  {
> +    if (vkb->backend_type == LIBXL_VKB_BACKEND_UNKNOWN) {
> +        vkb->backend_type = LIBXL_VKB_BACKEND_QEMU;
> +    }
> +
>      return libxl__resolve_domid(gc, vkb->backend_domname, 
> &vkb->backend_domid);
>  }
>  
> +static int libxl__device_vkb_dm_needed(libxl_device_vkb *vkb, uint32_t domid)
> +{
> +   if (vkb->backend_type == LIBXL_VKB_BACKEND_QEMU) {
> +        return 1;
> +   }

Indentation is wrong here.

> +
> +    return 0;

This function can be simplified as

   return vkb->backend_type == LIBXL_VKB_BACKEND_QEMU;

I think this patch is also missing adding LIBXL_HAVE in libxl.h.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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