summaryrefslogtreecommitdiffstats
path: root/tools/bus_space/Python/lang.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2015-07-26 21:37:31 +0000
committermarcel <marcel@FreeBSD.org>2015-07-26 21:37:31 +0000
commita1823ab55e152ac47502eec09cf01b23ef1e9bb3 (patch)
tree59ac184600735945ed7377cd16ed2f73e6490328 /tools/bus_space/Python/lang.c
parenteb9cf93f912e1018f8d81e7512e11b4d97b78c95 (diff)
downloadFreeBSD-src-a1823ab55e152ac47502eec09cf01b23ef1e9bb3.zip
FreeBSD-src-a1823ab55e152ac47502eec09cf01b23ef1e9bb3.tar.gz
Change the dev argument from a full path to just the device
identification (e.g. isa:0x3f0 or pci0:2:1:0). In libbus, the device is turned into a path name. For bus_space_map(), the resource is now specified in a second argument. Before: bus.map('/dev/proto/pci0:2:1:0/pcicfg') busdma.tag_create('/dev/proto/pci0:2:1:0/busdma', ...) Now: bus.map('pci0:2:1:0', 'pcicfg') busdma.tag_create('pci0:2:1:0', ...)
Diffstat (limited to 'tools/bus_space/Python/lang.c')
-rw-r--r--tools/bus_space/Python/lang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/bus_space/Python/lang.c b/tools/bus_space/Python/lang.c
index 0b96db3..48a112b 100644
--- a/tools/bus_space/Python/lang.c
+++ b/tools/bus_space/Python/lang.c
@@ -131,12 +131,12 @@ bus_write_4(PyObject *self, PyObject *args)
static PyObject *
bus_map(PyObject *self, PyObject *args)
{
- char *dev;
+ char *dev, *resource;
int rid;
- if (!PyArg_ParseTuple(args, "s", &dev))
+ if (!PyArg_ParseTuple(args, "ss", &dev, &resource))
return (NULL);
- rid = bs_map(dev);
+ rid = bs_map(dev, resource);
if (rid == -1) {
PyErr_SetString(PyExc_IOError, strerror(errno));
return (NULL);
OpenPOWER on IntegriCloud