[U-Boot] [PATCH] [REBASED] part_efi: Fix partition size calculation due to inclusive ending LBA.

Wolfgang Denk wd at denx.de
Tue Jan 27 23:04:37 CET 2009


Dear Richard Retanubun,

In message <497DBE6A.5090107 at RuggedCom.com> you wrote:
> The ending LBA is inclusive. Hence, the partition size should be
> ((ending-LBA + 1) - starting-LBA) to get the proper partition size.
> 
> This is confirmed against the results from the parted tool.
> (e.g. use parted /dev/sda -s unit S print) and observe the size.
> 
> Signed-off-by: Richard Retanubun <RichardRetanubun at RuggedCom.com>
> ---
> Hi Wolfgang,
> Here is the patch rebased against commit 8f86a3636ef88427f880610638e80991adc41896
> 
> Thanks for the help
> -Richard
> 
>   disk/part_efi.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)

Applied, thanks, but...

> diff --git a/disk/part_efi.c b/disk/part_efi.c
> index cc188ee..d8a8111 100644
> --- a/disk/part_efi.c
> +++ b/disk/part_efi.c
> @@ -163,7 +163,9 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int 
> part,
^^^^^^^^^^
Line wrapped.

Please fix your mailer!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Democracy is mob rule, but with income taxes.


More information about the U-Boot mailing list