[PATCH 3/8] Handle partition allocation failures due to alignment adjustments.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolves: rhbz#693271
---
 pyanaconda/storage/partitioning.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 0051b93..b3847c3 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -830,6 +830,8 @@ def addPartition(disklabel, free, part_type, size):
     if not disklabel.endAlignment.isAligned(free, end):
         end = disklabel.endAlignment.alignNearest(free, end)
         log.debug("adjusted length from %d to %d" % (length, end - start + 1))
+        if start > end:
+            raise PartitioningError("unable to allocate aligned partition")
 
     new_geom = parted.Geometry(device=disklabel.partedDevice,
                                start=start,
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux