direct-io.hg

changeset 11090:2afc3f16ae6e

[LIBXC] Remove unused xc_evtchn_status().

Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Mon Aug 14 16:39:35 2006 +0100 (2006-08-14)
parents eb7e5d95e7ea
children 963a67ab8130
files tools/libxc/xc_evtchn.c tools/libxc/xenctrl.h tools/python/xen/lowlevel/xc/xc.c
line diff
     1.1 --- a/tools/libxc/xc_evtchn.c	Mon Aug 14 16:35:49 2006 +0100
     1.2 +++ b/tools/libxc/xc_evtchn.c	Mon Aug 14 16:39:35 2006 +0100
     1.3 @@ -49,14 +49,3 @@ int xc_evtchn_alloc_unbound(int xc_handl
     1.4  
     1.5      return rc;
     1.6  }
     1.7 -
     1.8 -
     1.9 -int xc_evtchn_status(int xc_handle,
    1.10 -                     uint32_t dom,
    1.11 -                     evtchn_port_t port,
    1.12 -                     xc_evtchn_status_t *status)
    1.13 -{
    1.14 -    status->dom  = (domid_t)dom;
    1.15 -    status->port = port;
    1.16 -    return do_evtchn_op(xc_handle, EVTCHNOP_status, status, sizeof(*status));
    1.17 -}
     2.1 --- a/tools/libxc/xenctrl.h	Mon Aug 14 16:35:49 2006 +0100
     2.2 +++ b/tools/libxc/xenctrl.h	Mon Aug 14 16:39:35 2006 +0100
     2.3 @@ -367,8 +367,6 @@ int xc_sched_credit_domain_get(int xc_ha
     2.4                                 uint32_t domid,
     2.5                                 struct sched_credit_adjdom *sdom);
     2.6  
     2.7 -typedef evtchn_status_t xc_evtchn_status_t;
     2.8 -
     2.9  /*
    2.10   * EVENT CHANNEL FUNCTIONS
    2.11   */
    2.12 @@ -387,11 +385,6 @@ int xc_evtchn_alloc_unbound(int xc_handl
    2.13                              uint32_t dom,
    2.14                              uint32_t remote_dom);
    2.15  
    2.16 -int xc_evtchn_status(int xc_handle,
    2.17 -                     uint32_t dom, /* may be DOMID_SELF */
    2.18 -                     evtchn_port_t port,
    2.19 -                     xc_evtchn_status_t *status);
    2.20 -
    2.21  int xc_physdev_pci_access_modify(int xc_handle,
    2.22                                   uint32_t domid,
    2.23                                   int bus,
     3.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Mon Aug 14 16:35:49 2006 +0100
     3.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Mon Aug 14 16:39:35 2006 +0100
     3.3 @@ -484,60 +484,6 @@ static PyObject *pyxc_evtchn_alloc_unbou
     3.4      return PyInt_FromLong(port);
     3.5  }
     3.6  
     3.7 -static PyObject *pyxc_evtchn_status(XcObject *self,
     3.8 -                                    PyObject *args,
     3.9 -                                    PyObject *kwds)
    3.10 -{
    3.11 -    PyObject *dict;
    3.12 -
    3.13 -    uint32_t dom = DOMID_SELF;
    3.14 -    int port, ret;
    3.15 -    xc_evtchn_status_t status;
    3.16 -
    3.17 -    static char *kwd_list[] = { "port", "dom", NULL };
    3.18 -
    3.19 -    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list, 
    3.20 -                                      &port, &dom) )
    3.21 -        return NULL;
    3.22 -
    3.23 -    ret = xc_evtchn_status(self->xc_handle, dom, port, &status);
    3.24 -    if ( ret != 0 )
    3.25 -        return PyErr_SetFromErrno(xc_error);
    3.26 -
    3.27 -    switch ( status.status )
    3.28 -    {
    3.29 -    case EVTCHNSTAT_closed:
    3.30 -        dict = Py_BuildValue("{s:s}", 
    3.31 -                             "status", "closed");
    3.32 -        break;
    3.33 -    case EVTCHNSTAT_unbound:
    3.34 -        dict = Py_BuildValue("{s:s}", 
    3.35 -                             "status", "unbound");
    3.36 -        break;
    3.37 -    case EVTCHNSTAT_interdomain:
    3.38 -        dict = Py_BuildValue("{s:s,s:i,s:i}", 
    3.39 -                             "status", "interdomain",
    3.40 -                             "dom", status.u.interdomain.dom,
    3.41 -                             "port", status.u.interdomain.port);
    3.42 -        break;
    3.43 -    case EVTCHNSTAT_pirq:
    3.44 -        dict = Py_BuildValue("{s:s,s:i}", 
    3.45 -                             "status", "pirq",
    3.46 -                             "irq", status.u.pirq);
    3.47 -        break;
    3.48 -    case EVTCHNSTAT_virq:
    3.49 -        dict = Py_BuildValue("{s:s,s:i}", 
    3.50 -                             "status", "virq",
    3.51 -                             "irq", status.u.virq);
    3.52 -        break;
    3.53 -    default:
    3.54 -        dict = Py_BuildValue("{}");
    3.55 -        break;
    3.56 -    }
    3.57 -    
    3.58 -    return dict;
    3.59 -}
    3.60 -
    3.61  static PyObject *pyxc_physdev_pci_access_modify(XcObject *self,
    3.62                                                  PyObject *args,
    3.63                                                  PyObject *kwds)
    3.64 @@ -1141,21 +1087,6 @@ static PyMethodDef pyxc_methods[] = {
    3.65        " remote_dom [int]: Remote domain to accept connections from.\n\n"
    3.66        "Returns: [int] Unbound event-channel port.\n" },
    3.67  
    3.68 -    { "evtchn_status", 
    3.69 -      (PyCFunction)pyxc_evtchn_status, 
    3.70 -      METH_VARARGS | METH_KEYWORDS, "\n"
    3.71 -      "Query the status of an event channel.\n"
    3.72 -      " dom  [int, SELF]: Dom-id of one endpoint of the channel.\n"
    3.73 -      " port [int]:       Port-id of one endpoint of the channel.\n\n"
    3.74 -      "Returns: [dict] dictionary is empty on failure.\n"
    3.75 -      " status [str]:  'closed', 'unbound', 'interdomain', 'pirq',"
    3.76 -      " or 'virq'.\n"
    3.77 -      "The following are returned if 'status' is 'interdomain':\n"
    3.78 -      " dom  [int]: Dom-id of remote endpoint.\n"
    3.79 -      " port [int]: Port-id of remote endpoint.\n"
    3.80 -      "The following are returned if 'status' is 'pirq' or 'virq':\n"
    3.81 -      " irq  [int]: IRQ number.\n" },
    3.82 -
    3.83      { "physdev_pci_access_modify",
    3.84        (PyCFunction)pyxc_physdev_pci_access_modify,
    3.85        METH_VARARGS | METH_KEYWORDS, "\n"