diff options
author | Peter Jones <pjones@redhat.com> | 2007-01-09 16:17:19 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2007-01-09 16:17:19 +0000 |
commit | 1b9906793174d40a77c905876961f64f2a2aa660 (patch) | |
tree | 822eb1f063ca39799dc9868a3f9a17938452129d | |
parent | e540455208d9906deece2c1407ccbbc600dd51a4 (diff) | |
download | anaconda-1b9906793174d40a77c905876961f64f2a2aa660.tar.gz anaconda-1b9906793174d40a77c905876961f64f2a2aa660.tar.xz anaconda-1b9906793174d40a77c905876961f64f2a2aa660.zip |
- use a per-arch minimum starting sector for partitions
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | autopart.py | 10 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-01-09 Peter Jones <pjones@redhat.com> + + * autopart.py (fitConstrained): Use per-arch minimum for the starting + sector of partitions. + 2007-01-09 David Cantrell <dcantrell@redhat.com> * vnc.py (askVncWindow): Only ask the user to run VNC if Xvnc is diff --git a/autopart.py b/autopart.py index fda41912a..e86fe4744 100644 --- a/autopart.py +++ b/autopart.py @@ -191,6 +191,11 @@ class partlist: self.parts = [] +def getMinimumSector(): + # XXX really this should be based on the disk label type, not the arch + if rhpl.getArch() == "sparc": + return 1L + return 0L # first step of partitioning voodoo # partitions with a specific start and end cylinder requested are @@ -225,8 +230,9 @@ def fitConstrained(diskset, requests, primOnly=0, newParts = None): raise PartitioningError, "Unable to create partition which extends beyond the end of the disk." # XXX need to check overlaps properly here - if startSec < 0: - startSec = 0L + minSec = getMinimumSector() + if startSec < minSec: + startSec = minSec if disk.type.check_feature(parted.DISK_TYPE_EXTENDED) and disk.extended_partition: |