All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tools: rename libxc's evtchn_port_or_error_t with an xc_ prefix
@ 2016-01-25 17:10 Ian Campbell
  2016-01-25 17:37 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Campbell @ 2016-01-25 17:10 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel
  Cc: Olaf Hering, Boris Ostrovsky, Ian Campbell

This is used only for xc_evtchn_alloc_unbound and the legacy/compat
versions of the old interfaces and avoids redefining the typedef. The
evtchn_port_or_error_t name is now used only be libxenevtchn.

None of the callers of xc_evtchn_alloc_unbound use the type
themselves.

NB xc_evtchn_alloc_unbound differs from xc_evtchn_bind_unbound_port
and the underlying xenevtchn_bind_unbound_port in that it allows the
specification of the local domain rather than assuming self. This is
only useful during domain build.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
Should also prefix libxenevtchn's version?
---
 tools/libxc/include/xenctrl.h        | 4 ++--
 tools/libxc/include/xenctrl_compat.h | 8 ++++----
 tools/libxc/xc_evtchn.c              | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index e632b1e..1d656ac 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -1077,7 +1077,7 @@ xc_cpumap_t xc_cpupool_freeinfo(xc_interface *xch);
  */
 
 /* A port identifier is guaranteed to fit in 31 bits. */
-typedef int evtchn_port_or_error_t;
+typedef int xc_evtchn_port_or_error_t;
 
 /**
  * This function allocates an unbound port.  Ports are named endpoints used for
@@ -1093,7 +1093,7 @@ typedef int evtchn_port_or_error_t;
  * @parm remote_dom the ID of the domain who will later bind
  * @return allocated port (in @dom) on success, -1 on failure
  */
-evtchn_port_or_error_t
+xc_evtchn_port_or_error_t
 xc_evtchn_alloc_unbound(xc_interface *xch,
                         uint32_t dom,
                         uint32_t remote_dom);
diff --git a/tools/libxc/include/xenctrl_compat.h b/tools/libxc/include/xenctrl_compat.h
index 54c23a4..dc513a3 100644
--- a/tools/libxc/include/xenctrl_compat.h
+++ b/tools/libxc/include/xenctrl_compat.h
@@ -57,15 +57,15 @@ xc_evtchn *xc_evtchn_open(xentoollog_logger *logger,
 int xc_evtchn_close(xc_evtchn *xce);
 int xc_evtchn_fd(xc_evtchn *xce);
 int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port);
-evtchn_port_or_error_t
+xc_evtchn_port_or_error_t
 xc_evtchn_bind_unbound_port(xc_evtchn *xce, int domid);
-evtchn_port_or_error_t
+xc_evtchn_port_or_error_t
 xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid,
                            evtchn_port_t remote_port);
-evtchn_port_or_error_t
+xc_evtchn_port_or_error_t
 xc_evtchn_bind_virq(xc_evtchn *xce, unsigned int virq);
 int xc_evtchn_unbind(xc_evtchn *xce, evtchn_port_t port);
-evtchn_port_or_error_t
+xc_evtchn_port_or_error_t
 xc_evtchn_pending(xc_evtchn *xce);
 int xc_evtchn_unmask(xc_evtchn *xce, evtchn_port_t port);
 
diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c
index 53f7605..8d4fcc1 100644
--- a/tools/libxc/xc_evtchn.c
+++ b/tools/libxc/xc_evtchn.c
@@ -43,7 +43,7 @@ static int do_evtchn_op(xc_interface *xch, int cmd, void *arg,
     return ret;
 }
 
-evtchn_port_or_error_t
+xc_evtchn_port_or_error_t
 xc_evtchn_alloc_unbound(xc_interface *xch,
                         uint32_t dom,
                         uint32_t remote_dom)
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-25 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 17:10 [PATCH 1/2] tools: rename libxc's evtchn_port_or_error_t with an xc_ prefix Ian Campbell
2016-01-25 17:37 ` Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.