On 16/02/17 12:40, Ed Bartosh wrote:
> Hi Kristian,
> 
> Thank you for the patch. It looks good to me. Just one thing needs to be
> changed. See my comment below.
> 
> On Thu, Feb 16, 2017 at 11:30:12AM +0100, Kristian Amlie wrote:
>> We don't need the gap that the extended partition occupies if we
>> already know that we have less than five partitions. Saves up to one
>> full alignment of space.
>>
>> Signed-off-by: Kristian Amlie <kristian.am...@mender.io>
>> ---
>>  scripts/lib/wic/plugins/imager/direct.py | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/lib/wic/plugins/imager/direct.py 
>> b/scripts/lib/wic/plugins/imager/direct.py
>> index 481d24d..bc2d620 100644
>> --- a/scripts/lib/wic/plugins/imager/direct.py
>> +++ b/scripts/lib/wic/plugins/imager/direct.py
>> @@ -344,6 +344,10 @@ class PartitionedImage():
>>  
>>          msger.debug("Assigning %s partitions to disks" % self.ptable_format)
>>  
>> +        # The number of primary and logical partitions. Extended partition 
>> and
>> +        # partitions not listed in the table are not included.
>> +        num_real_partitions = len([p for p in self.partitions if not 
>> p['no_table']])
>> +
> Hm... shouldn't it be 'if p.no_table'?
> 
> Did you run 'oe-selftest -r wic' btw? I'd be surprised if it doesn't
> fail at least some test cases with this change.

Hmm, you caught me. Since the code block looked virtually identical (but
indeed wasn't) I didn't rerun. But I think you're right, I will rerun them.

-- 
Kristian
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to