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-devel

[Xen-devel] [PATCH] remove unused xc_evtchn_status()

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] remove unused xc_evtchn_status()
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Mon, 14 Aug 2006 15:45:45 +0100
Delivery-date: Mon, 14 Aug 2006 07:46:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1155566436 -3600
# Node ID 09bc238664cb7b6d0f960f5e135ac80a75b342f1
# Parent  ca3c77c0fd1e94ec01431aff0257da458a1b83f3
Remove unused xc_evtchn_status().

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff -r ca3c77c0fd1e -r 09bc238664cb tools/libxc/xc_evtchn.c
--- a/tools/libxc/xc_evtchn.c   Mon Aug 14 14:38:23 2006 +0100
+++ b/tools/libxc/xc_evtchn.c   Mon Aug 14 15:40:36 2006 +0100
@@ -49,14 +49,3 @@ int xc_evtchn_alloc_unbound(int xc_handl
 
     return rc;
 }
-
-
-int xc_evtchn_status(int xc_handle,
-                     uint32_t dom,
-                     evtchn_port_t port,
-                     xc_evtchn_status_t *status)
-{
-    status->dom  = (domid_t)dom;
-    status->port = port;
-    return do_evtchn_op(xc_handle, EVTCHNOP_status, status, sizeof(*status));
-}
diff -r ca3c77c0fd1e -r 09bc238664cb tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Mon Aug 14 14:38:23 2006 +0100
+++ b/tools/libxc/xenctrl.h     Mon Aug 14 15:40:36 2006 +0100
@@ -367,8 +367,6 @@ int xc_sched_credit_domain_get(int xc_ha
                                uint32_t domid,
                                struct sched_credit_adjdom *sdom);
 
-typedef evtchn_status_t xc_evtchn_status_t;
-
 /*
  * EVENT CHANNEL FUNCTIONS
  */
@@ -386,11 +384,6 @@ int xc_evtchn_alloc_unbound(int xc_handl
 int xc_evtchn_alloc_unbound(int xc_handle,
                             uint32_t dom,
                             uint32_t remote_dom);
-
-int xc_evtchn_status(int xc_handle,
-                     uint32_t dom, /* may be DOMID_SELF */
-                     evtchn_port_t port,
-                     xc_evtchn_status_t *status);
 
 int xc_physdev_pci_access_modify(int xc_handle,
                                  uint32_t domid,
diff -r ca3c77c0fd1e -r 09bc238664cb tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Mon Aug 14 14:38:23 2006 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Mon Aug 14 15:40:36 2006 +0100
@@ -484,60 +484,6 @@ static PyObject *pyxc_evtchn_alloc_unbou
     return PyInt_FromLong(port);
 }
 
-static PyObject *pyxc_evtchn_status(XcObject *self,
-                                    PyObject *args,
-                                    PyObject *kwds)
-{
-    PyObject *dict;
-
-    uint32_t dom = DOMID_SELF;
-    int port, ret;
-    xc_evtchn_status_t status;
-
-    static char *kwd_list[] = { "port", "dom", NULL };
-
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list, 
-                                      &port, &dom) )
-        return NULL;
-
-    ret = xc_evtchn_status(self->xc_handle, dom, port, &status);
-    if ( ret != 0 )
-        return PyErr_SetFromErrno(xc_error);
-
-    switch ( status.status )
-    {
-    case EVTCHNSTAT_closed:
-        dict = Py_BuildValue("{s:s}", 
-                             "status", "closed");
-        break;
-    case EVTCHNSTAT_unbound:
-        dict = Py_BuildValue("{s:s}", 
-                             "status", "unbound");
-        break;
-    case EVTCHNSTAT_interdomain:
-        dict = Py_BuildValue("{s:s,s:i,s:i}", 
-                             "status", "interdomain",
-                             "dom", status.u.interdomain.dom,
-                             "port", status.u.interdomain.port);
-        break;
-    case EVTCHNSTAT_pirq:
-        dict = Py_BuildValue("{s:s,s:i}", 
-                             "status", "pirq",
-                             "irq", status.u.pirq);
-        break;
-    case EVTCHNSTAT_virq:
-        dict = Py_BuildValue("{s:s,s:i}", 
-                             "status", "virq",
-                             "irq", status.u.virq);
-        break;
-    default:
-        dict = Py_BuildValue("{}");
-        break;
-    }
-    
-    return dict;
-}
-
 static PyObject *pyxc_physdev_pci_access_modify(XcObject *self,
                                                 PyObject *args,
                                                 PyObject *kwds)
@@ -1140,21 +1086,6 @@ static PyMethodDef pyxc_methods[] = {
       " dom        [int]: Domain whose port space to allocate from.\n"
       " remote_dom [int]: Remote domain to accept connections from.\n\n"
       "Returns: [int] Unbound event-channel port.\n" },
-
-    { "evtchn_status", 
-      (PyCFunction)pyxc_evtchn_status, 
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Query the status of an event channel.\n"
-      " dom  [int, SELF]: Dom-id of one endpoint of the channel.\n"
-      " port [int]:       Port-id of one endpoint of the channel.\n\n"
-      "Returns: [dict] dictionary is empty on failure.\n"
-      " status [str]:  'closed', 'unbound', 'interdomain', 'pirq',"
-      " or 'virq'.\n"
-      "The following are returned if 'status' is 'interdomain':\n"
-      " dom  [int]: Dom-id of remote endpoint.\n"
-      " port [int]: Port-id of remote endpoint.\n"
-      "The following are returned if 'status' is 'pirq' or 'virq':\n"
-      " irq  [int]: IRQ number.\n" },
 
     { "physdev_pci_access_modify",
       (PyCFunction)pyxc_physdev_pci_access_modify,

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

<Prev in Thread] Current Thread [Next in Thread>