aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_netbsd.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-12-02 12:33:01 +0000
committerIan Campbell <ian.campbell@citrix.com>2010-12-02 12:33:01 +0000
commit77fcd869a7beb55857198b8d6cbffe63b33cac20 (patch)
treed287bebfcf6c4875211b535388359028fe1cba91 /tools/libxc/xc_netbsd.c
parentdf402317ce830040efd089ac6a36f30a075d939d (diff)
downloadxen-77fcd869a7beb55857198b8d6cbffe63b33cac20.tar.gz
xen-77fcd869a7beb55857198b8d6cbffe63b33cac20.tar.bz2
xen-77fcd869a7beb55857198b8d6cbffe63b33cac20.zip
libxc: NetBSD: implement xc_evtchn_bind_unbound_port.
Doesn't actually appear to be used anywhere but is defined for other OSes. The NetBSD evtchn.h contains comments "Return allocated port" for several ioctls which currently return the allocated port as a member of the argument structure and not as the ioctl return value (I think this is a cut and paste error). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_netbsd.c')
-rw-r--r--tools/libxc/xc_netbsd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 5958faaf6b..47f84853ed 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -206,6 +206,21 @@ int xc_evtchn_notify(int xce_handle, evtchn_port_t port)
}
evtchn_port_or_error_t
+xc_evtchn_bind_unbound_port(int xce_handle, int domid)
+{
+ struct ioctl_evtchn_bind_unbound_port bind;
+ int ret;
+
+ bind.remote_domain = domid;
+
+ ret = ioctl(xce_handle, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
+ if (ret == 0)
+ return bind.port;
+ else
+ return -1;
+}
+
+evtchn_port_or_error_t
xc_evtchn_bind_interdomain(int xce_handle, int domid,
evtchn_port_t remote_port)
{