[PATCH 3/3] cmd: let gpt_partition_entry be hexadecimal
Simon Glass
sjg at chromium.org
Sat Aug 26 04:04:33 CEST 2023
On Fri, 25 Aug 2023 at 19:53, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> In commands like 'ls mmc 0:f' the partition number is hexadecimal.
>
> In command 'gpt setenv' variable gpt_partition_entry needs to be set
> to a hexadecimal value to allow its use as a parameter in a
> subsequent command.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> cmd/gpt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
eek that is an unfortunate bug
>
> diff --git a/cmd/gpt.c b/cmd/gpt.c
> index 99ca0a6163..964056bd28 100644
> --- a/cmd/gpt.c
> +++ b/cmd/gpt.c
> @@ -744,7 +744,7 @@ static int gpt_setenv_part_variables(struct disk_partition *pinfo, int i)
> if (ret)
> goto fail;
>
> - ret = env_set_ulong("gpt_partition_entry", i);
> + ret = env_set_hex("gpt_partition_entry", i);
> if (ret)
> goto fail;
>
> --
> 2.40.1
>
More information about the U-Boot
mailing list