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

Re: Free space after partitioning



On 03/23/2012 03:43 PM, Matt Rose wrote:
> On 03/23/2012 10:21 AM, Jan Safranek wrote:
>> On 03/23/2012 02:30 PM, David Lehman wrote:
>>> getFreeRegions does not claim that you are allowed to create partitions
>>> within every free region it reports.
>> Ok, let me formulate my question in another way. How does a
>> pyanaconda.storage (or pyparted) user find all the space occupied by a
>> logical partition, incl. it's metadata sector?
>>
>> I thought I could compute it using end of previous free region (if any)
>> or end of previous partition, but that's broken.
>>
>> Jan
> "Does not do what you think it does" != Broken

I meant my assumption is broken :).

Anyway, with help of David Lehman, parted.Disk.getFirstPartition() is
what I need. I can walk the partitions then using nextPartition() and
watching its type I can get what I want - metadata location, free space
and partition data itself.


Jan


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