summaryrefslogtreecommitdiffstats
path: root/balkan
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-08-18 18:41:53 +0000
committerErik Troan <ewt@redhat.com>1999-08-18 18:41:53 +0000
commit8362cb8143026e9342291c90e7bd403f4cdd276b (patch)
tree24ab8e8ff30f71365d9f9e97214233b0b0208bde /balkan
parenta9098128f76c909f7b4b373f5de70017a4afa043 (diff)
downloadanaconda-8362cb8143026e9342291c90e7bd403f4cdd276b.tar.gz
anaconda-8362cb8143026e9342291c90e7bd403f4cdd276b.tar.xz
anaconda-8362cb8143026e9342291c90e7bd403f4cdd276b.zip
makefile changes
Diffstat (limited to 'balkan')
-rw-r--r--balkan/Makefile2
-rw-r--r--balkan/dos.c21
2 files changed, 14 insertions, 9 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;