From a1823ab55e152ac47502eec09cf01b23ef1e9bb3 Mon Sep 17 00:00:00 2001 From: marcel Date: Sun, 26 Jul 2015 21:37:31 +0000 Subject: 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', ...) --- tools/bus_space/Python/lang.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/bus_space/Python/lang.c') 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); -- cgit v1.1