Skip to content

libxl: use libxl__device_kind string to access device

Oleksandr Grytsov xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4libxl: use libxl__device_kind to get device XS entrytools/libxl/libxl_9pfs.c tools/libxl/libxl_colo_nic.c tools/libxl/libxl_console.c +13 more+135 -721 reply
2/4libxl: use libxl__device_kind in LIBXL_DEFINE_UPDATE_DEVIDtools/libxl/libxl_9pfs.c tools/libxl/libxl_console.c tools/libxl/libxl_device.c +7 more+19 -161 reply
3/4libxl: move libxl__device_from_ to LIBXL_DEFINE_DEVICE_FROM_TYPEtools/libxl/libxl_9pfs.c tools/libxl/libxl_console.c tools/libxl/libxl_internal.h +5 more+38 -1101 reply
4/4libxl: move ibxl_devid_to_device_... to LIBXL_DEFINE_DEVID_TO_DEVICEtools/libxl/libxl_internal.h tools/libxl/libxl_nic.c tools/libxl/libxl_vdispl.c +2 more+42 -1281 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchWei Liu
1/4A-b
2/4A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] libxl: use libxl__device_kind string to access device

From: Oleksandr Grytsov <[email protected]>

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(-)
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel