summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-08-23 20:35:14 +0000
committerMatt Wilson <msw@redhat.com>2000-08-23 20:35:14 +0000
commitb4fdba468edc5b84f66c4cf8219fa4a97d8a0127 (patch)
treeeeb98f6b7efbee0238a8a3766f1c859b6f1d4290
parentcc523011cd711cb4d417f6937c9610f9b8437d6e (diff)
downloadanaconda-b4fdba468edc5b84f66c4cf8219fa4a97d8a0127.tar.gz
anaconda-b4fdba468edc5b84f66c4cf8219fa4a97d8a0127.tar.xz
anaconda-b4fdba468edc5b84f66c4cf8219fa4a97d8a0127.zip
hack for edd
-rw-r--r--edd/Makefile7
-rw-r--r--edd/pyedd.c19
2 files changed, 22 insertions, 4 deletions
diff --git a/edd/Makefile b/edd/Makefile
index b49db086b..fdba1ff65 100644
--- a/edd/Makefile
+++ b/edd/Makefile
@@ -2,7 +2,8 @@ include ../Makefile.inc
CFLAGS=-Wall -O -g -fpic -I/usr/include/python1.5# -DDEBUG
-TARGETS=eddmodule.so libedd.a(edd.o lrmi.o)
+#libedd.a(edd.o lrmi.o)
+TARGETS=eddmodule.so
ifeq (.depend,$(wildcard .depend))
TARGET=all
@@ -20,9 +21,9 @@ install: all
edd: lrmi.c edd.c
gcc -DDEBUG -o edd lrmi.c edd.c
-eddmodule.so: pyedd.c edd.o lrmi.o
+eddmodule.so: pyedd.c # edd.o lrmi.o
gcc -c -o pyedd.o -fpic pyedd.c $(CFLAGS)
- gcc -shared -g -o $@ pyedd.o edd.o lrmi.o
+ gcc -shared -g -o $@ pyedd.o # edd.o lrmi.o
clean:
rm -f *.o *.so *~ core
diff --git a/edd/pyedd.c b/edd/pyedd.c
index a0d845caf..eeae3ee46 100644
--- a/edd/pyedd.c
+++ b/edd/pyedd.c
@@ -15,7 +15,9 @@
*
*/
+#if 0
#include "edd.h"
+#endif
#include <Python.h>
@@ -28,8 +30,22 @@ static PyMethodDef edd_module_methods[] = {
static PyObject *
edd_py_detect (PyObject * s, PyObject * args) {
- int device = 0x80;
+
+ FILE *f = fopen("/proc/cmdline", "r");
+ if (f) {
+ char buf[100];
+ fgets(buf, sizeof(buf) - 1, f);
+ fclose(f);
+ if (strstr(buf, "lba32"))
+ return Py_BuildValue ("i", 1);
+ return Py_BuildValue ("i", 0);
+ } else
+ return Py_BuildValue ("i", 0);
+
+#if 0
+ /* not reached */
EDDCapability *ec;
+ int device = 0x80;
if (!PyArg_ParseTuple(args, "|i", &device))
return NULL;
@@ -39,6 +55,7 @@ edd_py_detect (PyObject * s, PyObject * args) {
return Py_BuildValue ("i", 1);
}
return Py_BuildValue ("i", 0);
+#endif
}
void initedd (void) {