head 1.5; access; symbols pkgsrc-2014Q1:1.4.0.64 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.62 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.60 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.58 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.56 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.54 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.52 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.50 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.48 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.46 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.44 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.42 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.40 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.38 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.36 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.34 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.32 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.30 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.28 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.26 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.24 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.22 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.20 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.18 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.16 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.14 pkgsrc-2008Q1:1.4.0.12 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.10 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.8 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.6 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.4 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.2 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.3.0.10 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.8 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.6 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.4 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.2 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.2.0.2 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.1.1.1.0.2 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.5 date 2014.05.25.15.35.35; author gdt; state dead; branches; next 1.4; commitid tewNFjYS9AE4YVBx; 1.4 date 2006.11.22.00.12.34; author seb; state Exp; branches; next 1.3; 1.3 date 2005.07.13.01.28.37; author grant; state Exp; branches; next 1.2; 1.2 date 2005.06.04.11.34.30; author yamt; state Exp; branches; next 1.1; 1.1 date 2005.03.07.15.59.08; author bouyer; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2005.03.07.15.59.08; author bouyer; state Exp; branches; next ; desc @@ 1.5 log @Remove xentools20. @ text @$NetBSD: patch-ac,v 1.4 2006/11/22 00:12:34 seb Exp $ --- python/xen/lowlevel/xu/xu.c.orig 2005-08-03 23:57:58.000000000 +0000 +++ python/xen/lowlevel/xu/xu.c @@@@ -15,7 +15,9 @@@@ #include #include #include +#ifndef __NetBSD__ #include +#endif #include #include #include @@@@ -25,7 +27,11 @@@@ #include #include +#ifdef __NetBSD__ +#include +#else #include +#endif #define XENPKG "xen.lowlevel.xu" @@@@ -35,6 +41,9 @@@@ #endif /* NB. The following should be kept in sync with the kernel's evtchn driver. */ +#ifdef __NetBSD__ +#define EVTCHN_DEV_NAME "/dev/xenevt" +#else #define EVTCHN_DEV_NAME "/dev/xen/evtchn" #define EVTCHN_DEV_MAJOR 10 #define EVTCHN_DEV_MINOR 201 @@@@ -45,6 +54,7 @@@@ #define EVTCHN_BIND _IO('E', 2) /* EVTCHN_UNBIND: Unbind from the specified event-channel port. */ #define EVTCHN_UNBIND _IO('E', 3) +#endif /* Size of a machine page frame. */ #define PAGE_SIZE 4096 @@@@ -130,7 +140,11 @@@@ static PyObject *xu_notifier_bind(PyObje if ( !PyArg_ParseTuple(args, "i", &idx) ) return NULL; +#ifdef __NetBSD__ + if ( ioctl(xun->evtchn_fd, EVTCHN_BIND, &idx) != 0 ) +#else if ( ioctl(xun->evtchn_fd, EVTCHN_BIND, idx) != 0 ) +#endif return PyErr_SetFromErrno(PyExc_IOError); Py_INCREF(Py_None); @@@@ -145,7 +159,11 @@@@ static PyObject *xu_notifier_unbind(PyOb if ( !PyArg_ParseTuple(args, "i", &idx) ) return NULL; +#ifdef __NetBSD__ + if ( ioctl(xun->evtchn_fd, EVTCHN_UNBIND, &idx) != 0 ) +#else if ( ioctl(xun->evtchn_fd, EVTCHN_UNBIND, idx) != 0 ) +#endif return PyErr_SetFromErrno(PyExc_IOError); Py_INCREF(Py_None); @@@@ -192,13 +210,16 @@@@ staticforward PyTypeObject xu_notifier_t static PyObject *xu_notifier_new(PyObject *self, PyObject *args) { xu_notifier_object *xun; +#ifndef __NetBSD__ struct stat st; +#endif if ( !PyArg_ParseTuple(args, "") ) return NULL; xun = PyObject_New(xu_notifier_object, &xu_notifier_type); +#ifndef __NetBSD__ /* Make sure any existing device file links to correct device. */ if ( (lstat(EVTCHN_DEV_NAME, &st) != 0) || !S_ISCHR(st.st_mode) || @@@@ -206,14 +227,17 @@@@ static PyObject *xu_notifier_new(PyObjec (void)unlink(EVTCHN_DEV_NAME); reopen: +#endif xun->evtchn_fd = open(EVTCHN_DEV_NAME, O_NONBLOCK|O_RDWR); if ( xun->evtchn_fd == -1 ) { +#ifndef __NetBSD__ if ( (errno == ENOENT) && ((mkdir("/dev/xen", 0755) == 0) || (errno == EEXIST)) && (mknod(EVTCHN_DEV_NAME, S_IFCHR|0600, makedev(EVTCHN_DEV_MAJOR,EVTCHN_DEV_MINOR)) == 0) ) goto reopen; +#endif PyObject_Del((PyObject *)xun); return PyErr_SetFromErrno(PyExc_IOError); } @@@@ -508,7 +532,7 @@@@ static PyObject *xu_message_get_payload( return dict; } - return PyString_FromStringAndSize(xum->msg.msg, xum->msg.length); + return PyString_FromStringAndSize((char *)xum->msg.msg, xum->msg.length); } static PyObject *xu_message_get_header(PyObject *self, PyObject *args) @@@@ -1110,7 +1134,8 @@@@ static PyObject *xu_port_new(PyObject *s * The control-interface event channel for DOM0 is already set up. * We use an ioctl to discover the port at our end of the channel. */ - port1 = ioctl(xup->xc_handle, IOCTL_PRIVCMD_INITDOMAIN_EVTCHN, NULL); + if (ioctl(xup->xc_handle, IOCTL_PRIVCMD_INITDOMAIN_EVTCHN, &port1)) + port1 = -1; port2 = -1; /* We don't need the remote end of the DOM0 link. */ if ( port1 < 0 ) { @ 1.4 log @Fix build with libcurl-7.6.10. Fix build with NetBSD's current gcc 4.1.2. Bump PKGREVISION to 9. Approved by maintainer. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 2005/07/13 01:28:37 grant Exp $ @ 1.3 log @fix build on Linux: - add some missing #ifdef __NetBSD__ and restore some Linux #includes - use subst framework instead of hardcoding /kern paths in patches @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- python/xen/lowlevel/xu/xu.c.orig 2005-05-22 20:56:26.000000000 +1000 d104 9 @ 1.2 log @xentools20: switch to use the new version of IOCTL_PRIVCMD_INITDOMAIN_EVTCHN. bump PKGREVISION to nb1. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.1.1.1 2005/03/07 15:59:08 bouyer Exp $ d3 3 a5 3 --- python/xen/lowlevel/xu/xu.c.orig 2005-01-12 13:22:21.000000000 +0100 +++ python/xen/lowlevel/xu/xu.c 2005-02-05 20:22:08.000000000 +0100 @@@@ -15,7 +15,6 @@@@ d9 3 a11 1 -#include d15 1 a15 1 @@@@ -25,7 +24,7 @@@@ d19 1 a19 1 -#include d21 3 d27 1 a27 1 @@@@ -35,6 +34,9 @@@@ d37 1 a37 1 @@@@ -45,6 +47,7 @@@@ d45 1 a45 1 @@@@ -130,7 +133,11 @@@@ d57 1 a57 1 @@@@ -145,7 +152,11 @@@@ d69 1 a69 1 @@@@ -192,13 +203,16 @@@@ d86 1 a86 1 @@@@ -206,14 +220,17 @@@@ d104 1 a104 1 @@@@ -1083,7 +1100,8 @@@@ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: $ d104 2 a105 2 + (void)ioctl(xup->xc_handle, IOCTL_PRIVCMD_INITDOMAIN_EVTCHN, NULL); + port1 = errno; @ 1.1.1.1 log @Initial import of xentools 2.0, for use with NetBSD as a xen2 domain0. @ text @@