diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-11 03:02:35 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-11 03:02:35 +0000 |
commit | 5210d62a012cc1e8e881732a863578d385175f67 (patch) | |
tree | b3af51e3546772762c1027def302b2341bbca1e9 /autopart.py | |
parent | 3f04b3fedfdb6b3b7035ae47c610a6f871f33830 (diff) | |
download | anaconda-5210d62a012cc1e8e881732a863578d385175f67.tar.gz anaconda-5210d62a012cc1e8e881732a863578d385175f67.tar.xz anaconda-5210d62a012cc1e8e881732a863578d385175f67.zip |
not all partition tables are limited to only 4 primary partitions...
Diffstat (limited to 'autopart.py')
-rw-r--r-- | autopart.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/autopart.py b/autopart.py index d6f2f894d..76f31ca89 100644 --- a/autopart.py +++ b/autopart.py @@ -86,12 +86,13 @@ def findFreespace(diskset): def bestPartType(disk, request): numPrimary = len(get_primary_partitions(disk)) - if numPrimary == 4: + maxPrimary = disk.max_primary_partition_count + if numPrimary == maxPrimary: # raise an error? return PARTITION_FAIL if request.primary: return parted.PARTITION_PRIMARY - if numPrimary == 3 and not disk.extended_partition: + if (numPrimary == (maxPrimary - 1)) and not disk.extended_partition: return parted.PARTITION_EXTENDED return parted.PARTITION_PRIMARY |