* [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA.
@ 2008-12-12 15:44 Richard Retanubun
2009-01-24 0:34 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Richard Retanubun @ 2008-12-12 15:44 UTC (permalink / raw)
To: u-boot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA.
2008-12-12 15:44 [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA Richard Retanubun
@ 2009-01-24 0:34 ` Wolfgang Denk
2009-01-24 1:04 ` [U-Boot] uboot pci enumeration Vinay Venkataraghavan
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2009-01-24 0:34 UTC (permalink / raw)
To: u-boot
Dear Richard Retanubun,
In message <494286ED.2070207@RuggedCom.com> you wrote:
> From b24eaf52ade5e5f1e94243f727d4c0f6d0fccdf5 Mon Sep 17 00:00:00 2001
> From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
> Date: Fri, 12 Dec 2008 10:23:45 -0500
> Subject: [PATCH] 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@RuggedCom.com>
Sorry, this does not apply:
Applying: part_efi: Fix partition size calculation due to inclusive ending LBA.
error: patch failed: disk/part_efi.c:163
error: disk/part_efi.c: patch does not apply
Using index info to reconstruct a base tree...
error: patch failed: disk/part_efi.c:163
error: disk/part_efi.c: patch does not apply
Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Cannot fall back to three-way merge.
Patch failed at 0001.
Please rebase and resubmit.
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
The joys of love made her human and the agonies of love destroyed
her.
-- Spock, "Requiem for Methuselah", stardate 5842.8
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] uboot pci enumeration
2009-01-24 0:34 ` Wolfgang Denk
@ 2009-01-24 1:04 ` Vinay Venkataraghavan
0 siblings, 0 replies; 5+ messages in thread
From: Vinay Venkataraghavan @ 2009-01-24 1:04 UTC (permalink / raw)
To: u-boot
Hello everybody,
Really quick and hopefully easy question:
Does uboot do PCI enumeration in common code or is this task left to the individual board specific code and setup tasks.?
Thanks a lot in advance!!
- Vinay
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA.
2009-01-05 22:05 [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA Richard Retanubun
@ 2009-01-23 13:35 ` Richard Retanubun
0 siblings, 0 replies; 5+ messages in thread
From: Richard Retanubun @ 2009-01-23 13:35 UTC (permalink / raw)
To: u-boot
Ping. checking for feedback on this patch, thanks.
> This patch fixed an off-by-one bug found for GPT. Because the ending LBA is inclusive,
> the partition size should be ((ending_lba + 1) - starting-LBA).
>
> 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@RuggedCom.com>
> ---
> Hi Wolfgang,
>
> I sent this patch in december 12 to u-boot at lists.denx.de but I don't see it
> in the mailing list (possibly because I botched the commit message).
>
> disk/part_efi.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> 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,
>
> /* The ulong casting limits the maximum disk size to 2 TB */
> info->start = (ulong) le64_to_int((*pgpt_pte)[part - 1].starting_lba);
> - info->size = (ulong) le64_to_int((*pgpt_pte)[part - 1].ending_lba) - info->start;
> + /* The ending LBA is inclusive, to calculate size, add 1 to it */
> + info->size = ((ulong)le64_to_int((*pgpt_pte)[part - 1].ending_lba) + 1)
> + - info->start;
> info->blksz = GPT_BLOCK_SIZE;
>
> sprintf((char *)info->name, "%s%d\n", GPT_ENTRY_NAME, part);
> --
> 1.5.6.5
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA.
@ 2009-01-05 22:05 Richard Retanubun
2009-01-23 13:35 ` Richard Retanubun
0 siblings, 1 reply; 5+ messages in thread
From: Richard Retanubun @ 2009-01-05 22:05 UTC (permalink / raw)
To: u-boot
This patch fixed an off-by-one bug found for GPT. Because the ending LBA is inclusive,
the partition size should be ((ending_lba + 1) - starting-LBA).
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@RuggedCom.com>
---
Hi Wolfgang,
I sent this patch in december 12 to u-boot at lists.denx.de but I don't see it
in the mailing list (possibly because I botched the commit message).
disk/part_efi.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
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,
/* The ulong casting limits the maximum disk size to 2 TB */
info->start = (ulong) le64_to_int((*pgpt_pte)[part - 1].starting_lba);
- info->size = (ulong) le64_to_int((*pgpt_pte)[part - 1].ending_lba) - info->start;
+ /* The ending LBA is inclusive, to calculate size, add 1 to it */
+ info->size = ((ulong)le64_to_int((*pgpt_pte)[part - 1].ending_lba) + 1)
+ - info->start;
info->blksz = GPT_BLOCK_SIZE;
sprintf((char *)info->name, "%s%d\n", GPT_ENTRY_NAME, part);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-24 1:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-12 15:44 [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA Richard Retanubun
2009-01-24 0:34 ` Wolfgang Denk
2009-01-24 1:04 ` [U-Boot] uboot pci enumeration Vinay Venkataraghavan
2009-01-05 22:05 [U-Boot] [PATCH] part_efi: Fix partition size calculation due to inclusive ending LBA Richard Retanubun
2009-01-23 13:35 ` Richard Retanubun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.