summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--balkan/Makefile2
-rw-r--r--balkan/dos.c21
-rw-r--r--isys/Makefile5
-rw-r--r--rpmmodule/Makefile6
4 files changed, 19 insertions, 15 deletions
diff --git a/balkan/Makefile b/balkan/Makefile
index f1101eb3a..0aec850e3 100644
--- a/balkan/Makefile
+++ b/balkan/Makefile
@@ -20,4 +20,4 @@ clean:
dos.o: dos.h
install: all
- #cp _balkanmodule.so $(PYTHONLIBDIR)
+ cp _balkanmodule.so $(PYTHONLIBDIR)
diff --git a/balkan/dos.c b/balkan/dos.c
index 8cfeadda0..a9647d8d4 100644
--- a/balkan/dos.c
+++ b/balkan/dos.c
@@ -57,13 +57,13 @@ static int readNextTable(int fd, struct partitionTable * table, int nextNum,
long long partSector, long long sectorOffset) {
struct singlePartitionTable singleTable;
int rc;
- int i;
+ int i, thisPart;
int gotExtended = 0;
if ((rc = readSingleTable(fd, &singleTable, partSector + sectorOffset)))
return rc;
- if (nextNum > 4) {
+ if (nextNum >= 4) {
/* This is an extended table */
if (singleTable.parts[2].size || singleTable.parts[3].size)
return BALKAN_ERROR_BADTABLE;
@@ -72,16 +72,21 @@ static int readNextTable(int fd, struct partitionTable * table, int nextNum,
for (i = 0; i < 4; i++) {
if (!singleTable.parts[i].size) continue;
if (singleTable.parts[i].type == DOSP_TYPE_EXTENDED &&
- nextNum >= 5) continue;
+ nextNum >= 4) continue;
- table->parts[nextNum].startSector = singleTable.parts[i].start +
- sectorOffset;
- table->parts[nextNum].size = singleTable.parts[i].size;
- table->parts[nextNum].type = singleTable.parts[i].type;
+ if (nextNum < 4)
+ thisPart = i;
+ else
+ thisPart = nextNum++;
- nextNum++;
+ table->parts[thisPart].startSector = singleTable.parts[i].start +
+ sectorOffset;
+ table->parts[thisPart].size = singleTable.parts[i].size;
+ table->parts[thisPart].type = singleTable.parts[i].type;
}
+ if (nextNum < 4) nextNum = 4;
+
/* look for extended partitions */
for (i = 0; i < 4; i++) {
if (!singleTable.parts[i].size) continue;
diff --git a/isys/Makefile b/isys/Makefile
index 84596c327..57fe503fe 100644
--- a/isys/Makefile
+++ b/isys/Makefile
@@ -1,5 +1,3 @@
-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 \
smp.o moduleinfo.o devnodes.o otherinsmod.o cpio.o probe.o
@@ -7,6 +5,7 @@ STATICLIBS = pci/libpciprobe.a modutils/insmod/libmodutils.a \
modutils/obj/libobj.a modutils/util/libutil.a
LOADLIBES = -lrpm -lresolv -lz -lpci
SUBDIRS = modutils pci
+PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages
all: subdirs _isys.so libisys.a
@@ -20,7 +19,7 @@ clean:
for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d clean; done
install: all
- cp _isys.so isys.py $(DESTDIR)
+ cp _isys.so isys.py $(PYTHONLIBDIR)
subdirs:
for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d; done
diff --git a/rpmmodule/Makefile b/rpmmodule/Makefile
index 6ae8d1856..6546c9e0a 100644
--- a/rpmmodule/Makefile
+++ b/rpmmodule/Makefile
@@ -1,4 +1,4 @@
-DESTDIR = $(TOPDIR)/RedHat/instimage/usr/lib/python1.5/site-packages
+PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages
CFLAGS += -fPIC -I/usr/include/rpm -I/usr/include/python1.5 -g
@@ -13,5 +13,5 @@ clean:
rm -f *.o $(TARGET)
install: all
- mkdir -p $(DESTDIR)
- cp $(TARGET) $(DESTDIR)
+ mkdir -p $(PYTHONLIBDIR)
+ cp $(TARGET) $(PYTHONLIBDIR)