FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 06-24-2010, 06:34 PM
David Lehman
 
Default Enforce format min/max size for fixed-size requests.

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

diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 9b49152..61f03ae 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -980,6 +980,20 @@ def allocatePartitions(storage, disks, partitions, freespace):
if _part.req_grow:
current_free = None

+ problem = None
+ if _part.req_size > _part.format.maxSize:
+ problem = "large"
+ elif ((not _part.req_grow and
+ _part.req_size < _part.format.minSize) or
+ (_part.req_grow and _part.req_max_size and
+ _part.req_max_size < _part.format.minSize)):
+ # format max/min size also enforced in growPartitions
+ problem = "small"
+
+ if problem:
+ raise PartitioningError("partition is too %s for %s formatting"
+ % (problem, _part.format.name))
+
log.debug("checking freespace on %s" % _disk.name)

new_part_type = getNextPartitionType(disklabel.partedDisk)
--
1.6.6.1

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

Thread Tools




All times are GMT. The time now is 12:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org