On 12/3/25 4:19 PM, Sascha Hauer wrote:
> For the alternate GPT we hardcode to write 32 blocks for the partition
> entries. When writing partitions we only accept partition tables with
> 128 entries which translates to 32 blocks anyway, so no functional
> change, but for correctness use the variable we also use for writing
> the primary GPT's partition entries.
>
> Signed-off-by: Sascha Hauer <[email protected]>
Reviewed-by: Ahmad Fatoum <[email protected]>
> ---
> common/partitions/efi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/partitions/efi.c b/common/partitions/efi.c
> index
> da9c2d89c1c68ae1acebc1f8eaea8da48243f0d6..76c5393dddb04e2966d3a4b4478d5085f008d935
> 100644
> --- a/common/partitions/efi.c
> +++ b/common/partitions/efi.c
> @@ -801,7 +801,7 @@ static __maybe_unused int efi_partition_write(struct
> partition_desc *pd)
>
> if (ret)
> goto err_block_write;
> - ret = block_write(blk, epd->ptes, last_lba(blk) - 32, 32);
> + ret = block_write(blk, epd->ptes, last_lba(blk) - 32, size);
> if (ret)
> goto err_block_write;
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |