Re: [PATCH 28/30] Add a slice when the extended partition contains "free space"

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

 



On Fri, Sep 25, 2009 at 02:08:34PM -1000, David Cantrell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Comments inline.
>
> On Wed, 16 Sep 2009, Joel Granados Moreno wrote:
>
>> * iw/partition_gui.py (_createStripe): We add a "free space" sliece to
>> the extended partition when the last offset of the last logical
>> parition is less then the end of the extended partition.
>> ---
>> iw/partition_gui.py |   49 +++++++++++++++++++++++++++++++++++++++++++------
>> 1 files changed, 43 insertions(+), 6 deletions(-)
>>
>> diff --git a/iw/partition_gui.py b/iw/partition_gui.py
>> index a9547f2..11cc76f 100644
>> --- a/iw/partition_gui.py
>> +++ b/iw/partition_gui.py
>> @@ -337,42 +337,64 @@ class DiskStripeGraph(StripeGraph):
>>                 drive.size, drive.model)
>>         stripe = Stripe(self.getCanvas(), drivetext, self.editCB, obj = drive)
>>
>> +        # Free Extended Calculation
>> +        # Free slice/partition in the extended partition "free space".  If there
>> +        # is space between the last logical partition and the ending of the
>> +        # extended partition we create a "free space" in the extended part.
>>         # Create the slices.
>> +
>> +        # These offsets are where the partition/slices end. 0<offset<1
>> +        last_logical_offset = None
>> +        last_extended_offset = None
>> +
>>         for part in drive.format.partedDisk.getFreeSpacePartitions() \
>>                 + [d for d in drive.format.partitions]:
>>             if part.getSize(unit="MB") <= 1.0:
>>                 continue
>>
>> +            # Create the start and length for the slice.
>> +            xoffset = float(part.geometry.start) \
>> +                    / float(drive.partedDevice.length)
>> +            xlength = float(part.geometry.length) \
>> +                    / float(drive.partedDevice.length)
>> +
>
> Same division split across lines comment from the other email.

yep, I have alredy addressed this.

>
>>             if part.type == parted.PARTITION_LOGICAL:
>>                 partstr = "%s\n%s MB" % (part.path, part.getSize())
>>                 stype = Slice.SUBSLICE
>>                 unsel_col = self.part_type_colors["unsel_logical"]
>>                 sel_col = self.part_type_colors["sel_logical"]
>> +
>> +                # Free Extended Calculation
>> +                if last_logical_offset == None:
>> +                    last_logical_offset = xoffset + xlength
>> +                elif last_logical_offset < xoffset + xlength:
>> +                    last_logical_offset = xoffset + xlength
>> +
>>             elif part.type == parted.PARTITION_FREESPACE:
...

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.

Attachment: pgpO5Hsgv3fgS.pgp
Description: PGP signature

_______________________________________________
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