[PATCH] cmd: gpt: initialize partition table

Tom Rini trini at konsulko.com
Mon Apr 22 19:44:37 CEST 2024


On Mon, Apr 22, 2024 at 10:53:35PM +0530, Kishan Dudhatra wrote:
> If partition init is not completed within the gpt write,
> the gpt partition list will not be updated.
> 
> Signed-off-by: Kishan Dudhatra <kishan.dudhatra at siliconsignals.io>
> 
> diff --git a/cmd/gpt.c b/cmd/gpt.c
> index d7e96529a6..2d652f480a 100644
> --- a/cmd/gpt.c
> +++ b/cmd/gpt.c
> @@ -643,6 +643,10 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part)
>  	free(str_disk_guid);
>  	free(partitions);
>  
> +	/* initialize partition table */
> +	if ((blk_dev_desc)->uclass_id == UCLASS_MMC)
> +		part_init(blk_dev_desc);
> +
>  	return ret;
>  }

Is there something more generic we can check for here? This sounds like
a problem for any block device, not just MMC. Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240422/83013841/attachment.sig>


More information about the U-Boot mailing list