summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-07-07 19:03:14 +0000
committerMatt Wilson <msw@redhat.com>1999-07-07 19:03:14 +0000
commitde0f960ac06eab08e08b389327803e31adaa7aa1 (patch)
tree0c962b8fea5b2d00d771fab2ceb4baf4dfa51a05 /isys
parent6716a7df76aa65a0b2230fac7b475b0e98177580 (diff)
downloadanaconda-de0f960ac06eab08e08b389327803e31adaa7aa1.tar.gz
anaconda-de0f960ac06eab08e08b389327803e31adaa7aa1.tar.xz
anaconda-de0f960ac06eab08e08b389327803e31adaa7aa1.zip
fixed pci bindings
Diffstat (limited to 'isys')
-rw-r--r--isys/Makefile4
-rw-r--r--isys/isys.c12
-rw-r--r--isys/pci/Makefile4
3 files changed, 9 insertions, 11 deletions
diff --git a/isys/Makefile b/isys/Makefile
index 997866f6a..343d59f87 100644
--- a/isys/Makefile
+++ b/isys/Makefile
@@ -2,10 +2,10 @@ DESTDIR = $(TOPDIR)/RedHat/instimage/usr/lib/python1.5/site-packages
CFLAGS = -I/usr/include/python1.5 -g
OBJECTS = isys.o nfsmount.o dns.o mount_clnt.o mount_xdr.o imount.o \
- inet.o smp.o moduleinfo.o devnodes.o otherinsmod.o cpio.o
+ inet.o smp.o moduleinfo.o devnodes.o otherinsmod.o cpio.o ilang.o
STATICLIBS = pci/libpciprobe.a modutils/insmod/libmodutils.a \
modutils/obj/libobj.a modutils/util/libutil.a
-LOADLIBES = -lrpm -lresolv -lz
+LOADLIBES = -lrpm -lresolv -lz -lpci
SUBDIRS = modutils pci
all: subdirs _isys.so isys.a
diff --git a/isys/isys.c b/isys/isys.c
index ac8925c2c..1ca2ba45b 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -20,7 +20,7 @@ static PyObject * doRmmod(PyObject * s, PyObject * args);
static PyObject * doUMount(PyObject * s, PyObject * args);
static PyObject * getModuleList(PyObject * s, PyObject * args);
static PyObject * makeDevInode(PyObject * s, PyObject * args);
-static PyObject * pciProbe(PyObject * s, PyObject * args);
+static PyObject * doPciProbe(PyObject * s, PyObject * args);
static PyObject * smpAvailable(PyObject * s, PyObject * args);
static PyObject * doConfigNetDevice(PyObject * s, PyObject * args);
@@ -29,7 +29,7 @@ static PyMethodDef isysModuleMethods[] = {
{ "insmod", (PyCFunction) doInsmod, METH_VARARGS, NULL },
{ "mkdevinode", (PyCFunction) makeDevInode, METH_VARARGS, NULL },
{ "modulelist", (PyCFunction) getModuleList, METH_VARARGS, NULL },
- { "pciprobe", (PyCFunction) pciProbe, METH_VARARGS, NULL },
+ { "pciprobe", (PyCFunction) doPciProbe, METH_VARARGS, NULL },
{ "readmoduleinfo", (PyCFunction) doReadModInfo, METH_VARARGS, NULL },
{ "rmmod", (PyCFunction) doRmmod, METH_VARARGS, NULL },
{ "mount", (PyCFunction) doMount, METH_VARARGS, NULL },
@@ -210,8 +210,8 @@ static PyObject * doReadModInfo(PyObject * s, PyObject * args) {
return Py_None;
}
-static PyObject * pciProbe(PyObject * s, PyObject * args) {
- char ** matches, ** item;
+static PyObject * doPciProbe(PyObject * s, PyObject * args) {
+ struct pciDevice ** matches, ** item;
PyObject * list;
if (!PyArg_ParseTuple(args, "")) return NULL;
@@ -220,7 +220,7 @@ static PyObject * pciProbe(PyObject * s, PyObject * args) {
probePciReadDrivers("isys/pci/pcitable");
probePciReadDrivers("/etc/pcitable");
- matches = probePciDriverList();
+ matches = probePci(0, 1);
if (!matches) {
Py_INCREF(Py_None);
return Py_None;
@@ -228,7 +228,7 @@ static PyObject * pciProbe(PyObject * s, PyObject * args) {
list = PyList_New(0);
for (item = matches; *item; item++) {
- PyList_Append(list, Py_BuildValue("s", *item));
+ PyList_Append(list, Py_BuildValue("s", (*item)->driver));
}
free(matches);
diff --git a/isys/pci/Makefile b/isys/pci/Makefile
index fcecced15..5940d3464 100644
--- a/isys/pci/Makefile
+++ b/isys/pci/Makefile
@@ -8,8 +8,6 @@ libpciprobe.a: libpciprobe.a(pciprobe.o)
testprobe: libpciprobe.a pciprobe.c
$(CC) $(CFLAGS) $(LDFLAGS) -DTESTING pciprobe.c -o testprobe $(LOADLIBES)
-
+
clean:
rm -f *.o testprobe *.a core
-
-