Re: [PATCH 1/2] doc: Switch from setenv to env set

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTgwL7XFLonf1xeY7TkaW2rBJSyTSO+v+DCEdAfyXJBtGQ@mail.gmail.com>
Hi Marek,

On 2026-07-18T23:45:48, Marek Vasut <[email protected]> wrote:
> doc: Switch from setenv to env set
>
> The "env" command is the recommended environment management command,
> its "set" subcommand is the equivalent replacement for legacy "setenv"
> command. Update the documentation to use the contemporary "env set"
> command instead of legacy "setenv" command.
>
> Note that the "setenv" command is unlikely to be removed from U-Boot
> in the near future due to it being integral part of the command line
> ABI.
>
> Implemented using:
> $ sed -i 's@\<setenv\>@env set@g' $(git grep -li '\<setenv\>' doc/) README
>
> Signed-off-by: Marek Vasut <[email protected]>
> Reviewed-by: Mattijs Korpershoek <[email protected]>

> diff --git a/doc/usage/cmd/gpt.rst b/doc/usage/cmd/gpt.rst
> @@ -119,10 +119,10 @@ Sets the bootable flag for all partitions in the table. If the partition name
> -gpt setenv
> +gpt env set
>  ~~~~~~~~~~
>
> -The 'gpt setenv' command will set a series of environment variables with
> +The 'gpt env set' command will set a series of environment variables with

Not quite. 'gpt setenv' is a subcommand of gpt, not the standalone
setenv command, so it must not be rewritten. There is no 'gpt env set'
- cmd/gpt.c dispatches on argv[1] == 'setenv' (see gpt_setenv()), so
this documents a command that doesn't exist. The word-boundary sed has
caught it here and in the examples below:

    => gpt env set mmc 0 rootfs
    => gpt env set mmc 0 boot

Please revert these to 'gpt setenv'. It's worth grepping for other
command-prefixed uses (e.g. fdt, i2c) before resending, since the sed
can't tell a subcommand from the standalone command.

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.