xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Grytsov <al1img@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: ian.jackson@eu.citrix.com, wei.liu2@citrix.com,
	Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Subject: [PATCH 0/4] libxl: use libxl__device_kind string to access device
Date: Thu,  5 Oct 2017 12:30:44 +0300	[thread overview]
Message-ID: <1507195848-18346-1-git-send-email-al1img@gmail.com> (raw)

From: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

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


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

             reply	other threads:[~2017-10-05  9:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05  9:30 Oleksandr Grytsov [this message]
2017-10-05  9:30 ` [PATCH 1/4] libxl: use libxl__device_kind to get device XS entry Oleksandr Grytsov
2017-10-31 10:21   ` Wei Liu
2017-10-05  9:30 ` [PATCH 2/4] libxl: use libxl__device_kind in LIBXL_DEFINE_UPDATE_DEVID Oleksandr Grytsov
2017-10-31 10:21   ` Wei Liu
2017-10-05  9:30 ` [PATCH 3/4] libxl: move libxl__device_from_ to LIBXL_DEFINE_DEVICE_FROM_TYPE Oleksandr Grytsov
2017-10-31 10:25   ` Wei Liu
2017-10-05  9:30 ` [PATCH 4/4] libxl: move ibxl_devid_to_device_... to LIBXL_DEFINE_DEVID_TO_DEVICE Oleksandr Grytsov
2017-10-31 10:26   ` Wei Liu
2017-10-24  7:41 ` [PATCH 0/4] libxl: use libxl__device_kind string to access device Oleksandr Grytsov
2017-10-30 12:37   ` Oleksandr Grytsov
2018-01-24 12:10 ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507195848-18346-1-git-send-email-al1img@gmail.com \
    --to=al1img@gmail.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=oleksandr_grytsov@epam.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).