[U-Boot] [PATCH v3 6/6] cmd: gpt: solve issue for swap and rename command

Patrick DELAUNAY patrick.delaunay at st.com
Thu Oct 19 13:15:54 UTC 2017


Hi,

> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> 
> On 10/18/2017 07:11 AM, Patrick Delaunay wrote:
> > don't use prettyprint_part_size() in create_gpt_partitions_list() that
> > avoid to align offset and size to 1 MiB and increase precision for
> > start and size.
> > This patch avoid the risk to change partition size and lost data
> > during rename or swap.
> 
> All the test/py changes in this series,
> Acked-by: Stephen Warren <swarren at nvidia.com>
> 
> The series,
> Tested-by: Stephen Warren <swarren at nvidia.com>
> 
> If you're looking for more things to change(!), perhaps change the sgdisk
> commands so that the partitions are big enough that 'gpt read host 0' says
> something other than 'size 0MiB' for the partitions; when I saw that, I was
> initially rather confused until I realized that the partitions were less than 1MiB!

I don't really looking...
but I agree: size 0MiB is confusing, I had the same reaction the first time.

So I will propose something when this serie will be accepted,
just update the test to have 2 partitions with different size and > 1MiB.

Regards
Patrick


More information about the U-Boot mailing list