WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxc: NetBSD: implement xc_evtchn_bind_u

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: NetBSD: implement xc_evtchn_bind_unbound_port.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:33:51 -0800
Delivery-date: Thu, 23 Dec 2010 05:37:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1291293181 0
# Node ID ea4d24457d91eaeef715e8169c86a5d7ee0f1bde
# Parent  7446a2a78262cd06851718401ed3ca69f98ca81b
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@xxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Christoph Egger <Christoph.Egger@xxxxxxx>
committer: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/include/xen-sys/NetBSD/evtchn.h |    3 ---
 tools/libxc/xc_netbsd.c               |   15 +++++++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff -r 7446a2a78262 -r ea4d24457d91 tools/include/xen-sys/NetBSD/evtchn.h
--- a/tools/include/xen-sys/NetBSD/evtchn.h     Fri Dec 10 19:38:30 2010 +0000
+++ b/tools/include/xen-sys/NetBSD/evtchn.h     Thu Dec 02 12:33:01 2010 +0000
@@ -33,7 +33,6 @@
 
 /*
  * Bind a fresh port to VIRQ @virq.
- * Return allocated port.
  */
 #define IOCTL_EVTCHN_BIND_VIRQ                         \
        _IOWR('E', 4, struct ioctl_evtchn_bind_virq)
@@ -44,7 +43,6 @@ struct ioctl_evtchn_bind_virq {
 
 /*
  * Bind a fresh port to remote <@remote_domain, @remote_port>.
- * Return allocated port.
  */
 #define IOCTL_EVTCHN_BIND_INTERDOMAIN                  \
        _IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
@@ -55,7 +53,6 @@ struct ioctl_evtchn_bind_interdomain {
 
 /*
  * Allocate a fresh port for binding to @remote_domain.
- * Return allocated port.
  */
 #define IOCTL_EVTCHN_BIND_UNBOUND_PORT                 \
        _IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
diff -r 7446a2a78262 -r ea4d24457d91 tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c   Fri Dec 10 19:38:30 2010 +0000
+++ b/tools/libxc/xc_netbsd.c   Thu Dec 02 12:33:01 2010 +0000
@@ -203,6 +203,21 @@ int xc_evtchn_notify(int xce_handle, evt
     notify.port = port;
 
     return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
+}
+
+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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: NetBSD: implement xc_evtchn_bind_unbound_port., Xen patchbot-unstable <=