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

Re: [Xen-devel] [PATCH 0/4] libxl: use libxl__device_kind string to access device



On Thu, Oct 5, 2017 at 12:30 PM, Oleksandr Grytsov <al1img@xxxxxxxxx> wrote:
From: Oleksandr Grytsov <oleksandr_grytsov@xxxxxxxx>

In current implementation the path of device XS entry is created with
string from libxl__device_kind enum. But access to the device entry
usually done with hardcoded path. This is source of potential errors.
This patchset changes hardcoded device name in the XS path to string
representation of libxl__device_kind enum. Also it changes "type" field
in libxl__..._devtype structure to keep libxl__device_kind. It allows
to move some duplicated functions to macros.

Oleksandr Grytsov (4):
  libxl: use libxl__device_kind to get device XS entry
  libxl: use libxl__device_kind in LIBXL_DEFINE_UPDATE_DEVID
  libxl: move libxl__device_from_ to LIBXL_DEFINE_DEVICE_FROM_TYPE
  libxl: move ibxl_devid_to_device_... to LIBXL_DEFINE_DEVID_TO_DEVICE

 tools/libxl/libxl_9pfs.c      | 21 +++---------
 tools/libxl/libxl_colo_nic.c  |  6 ++--
 tools/libxl/libxl_console.c   | 36 +++++++++-----------
 tools/libxl/libxl_create.c    |  4 +--
 tools/libxl/libxl_device.c    | 10 +++---
 tools/libxl/libxl_disk.c      | 28 +++++++++++-----
 tools/libxl/libxl_domain.c    |  2 +-
 tools/libxl/libxl_internal.h  | 77 ++++++++++++++++++++++++++++++++++++-------
 tools/libxl/libxl_netbuffer.c |  6 ++--
 tools/libxl/libxl_nic.c       | 55 +++++++------------------------
 tools/libxl/libxl_pci.c       | 21 ++++++++----
 tools/libxl/libxl_usb.c       | 52 +++++++++++++++++++----------
 tools/libxl/libxl_vdispl.c    | 62 ++++++----------------------------
 tools/libxl/libxl_vkb.c       | 61 +++++-----------------------------
 tools/libxl/libxl_vsnd.c      | 62 ++++++----------------------------
 tools/libxl/libxl_vtpm.c      | 33 +++++++------------
 16 files changed, 222 insertions(+), 314 deletions(-)

--
2.7.4


ping

--
Best Regards,
Oleksandr Grytsov.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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