[PATCH] Environment: Change reporting "nowhere" as "magic hat" to user

Andrew Goodbody andrew.goodbody at linaro.org
Fri Nov 29 11:35:32 CET 2024


On 28/11/2024 15:12, Alicja Michalska wrote:
> Make string more user-friendly

I disagree. I can make a guess as to what 'Loading Environment from 
nowhere' means. To me it suggests that it has not found anywhere 
additional to load an environment from. It is a bit awkwardly phrased 
but it can be understood and it at least sticks to reality.
As for 'Loading Environment from a magic hat' - I have no idea what that 
is trying to convey and that lack of meaning is not, IMO, user-friendly.

Andrew

> Signed-off-by: Alicja Michalska <alicja.michalska at 9elements.com>
> ---
>   doc/arch/sandbox/sandbox.rst       | 2 +-
>   doc/board/emulation/qemu-x86.rst   | 2 +-
>   doc/board/sophgo/milkv_duo.rst     | 2 +-
>   doc/board/starfive/visionfive2.rst | 2 +-
>   doc/develop/uefi/u-boot_on_efi.rst | 2 +-
>   env/nowhere.c                      | 2 +-
>   test/py/tests/test_env.py          | 4 ++--
>   7 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst
> index a8b0d7f039..d88f05285e 100644
> --- a/doc/arch/sandbox/sandbox.rst
> +++ b/doc/arch/sandbox/sandbox.rst
> @@ -469,7 +469,7 @@ Here is an example trace::
>      Address in environment is	02:00:11:22:33:44
>      Core:  103 devices, 51 uclasses, devicetree: board
>      MMC:
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      In:    serial,cros-ec-keyb,usbkbd
>      Out:   serial,vidconsole
>      Err:   serial,vidconsole
> diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
> index c604e42990..06e9dcd999 100644
> --- a/doc/board/emulation/qemu-x86.rst
> +++ b/doc/board/emulation/qemu-x86.rst
> @@ -142,7 +142,7 @@ The output will be something like this::
>      CPU:   QEMU Virtual CPU version 2.5+
>      DRAM:  8 GiB
>      Core:  20 devices, 13 uclasses, devicetree: separate
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      Model: QEMU x86 (I440FX)
>      Net:   e1000: 52:54:00:12:34:56
>             eth0: e1000#0
> diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
> index cb2ed1ad98..243468bf10 100644
> --- a/doc/board/sophgo/milkv_duo.rst
> +++ b/doc/board/sophgo/milkv_duo.rst
> @@ -53,7 +53,7 @@ Sample boot log from Milk-V Duo board
>   
>      DRAM:  63.3 MiB
>      Core:  10 devices, 8 uclasses, devicetree: separate
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      In:    serial at 4140000
>      Out:   serial at 4140000
>      Err:   serial at 4140000
> diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst
> index 2c68df3ce4..7a926dc021 100644
> --- a/doc/board/starfive/visionfive2.rst
> +++ b/doc/board/starfive/visionfive2.rst
> @@ -209,7 +209,7 @@ Sample boot log from StarFive VisionFive2 board
>   	DRAM:  8 GiB
>   	Core:  107 devices, 18 uclasses, devicetree: separate
>   	MMC:   mmc at 16010000: 0, mmc at 16020000: 1
> -	Loading Environment from nowhere... OK
> +	Loading Environment from a magic hat... OK
>   	In:    serial at 10000000
>   	Out:   serial at 10000000
>   	Err:   serial at 10000000
> diff --git a/doc/develop/uefi/u-boot_on_efi.rst b/doc/develop/uefi/u-boot_on_efi.rst
> index 245b4af1fa..dbc2b74c6e 100644
> --- a/doc/develop/uefi/u-boot_on_efi.rst
> +++ b/doc/develop/uefi/u-boot_on_efi.rst
> @@ -230,7 +230,7 @@ This shows running with serial enabled (see `include/configs/efi-x86_app.h`)::
>      DRAM:  32 MiB
>       0: efi_media_0  PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0)
>       1: <partition>  PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,0FFD5E61-3B0C-4326-8049-BDCDC910AF72,0x800,0xB000)
> -   Loading Environment from nowhere... OK
> +   Loading Environment from a magic hat... OK
>      Model: EFI x86 Application
>      Hit any key to stop autoboot:  0
>   
> diff --git a/env/nowhere.c b/env/nowhere.c
> index 6b9b6e2fe0..63fc4647f6 100644
> --- a/env/nowhere.c
> +++ b/env/nowhere.c
> @@ -45,5 +45,5 @@ U_BOOT_ENV_LOCATION(nowhere) = {
>   	.location	= ENVL_NOWHERE,
>   	.init		= env_nowhere_init,
>   	.load		= env_nowhere_load,
> -	ENV_NAME("nowhere")
> +	ENV_NAME("a magic hat")
>   };
> diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
> index 4471db7d9c..3cd06c5c90 100644
> --- a/test/py/tests/test_env.py
> +++ b/test/py/tests/test_env.py
> @@ -527,10 +527,10 @@ def test_env_ext4(state_test_env):
>   
>           # restore env location: NOWHERE (prio 0 in sandbox)
>           response = c.run_command('env select nowhere')
> -        assert 'Select Environment on nowhere: OK' in response
> +        assert 'Select Environment from a magic hat: OK' in response
>   
>           response = c.run_command('env load')
> -        assert 'Loading Environment from nowhere... OK' in response
> +        assert 'Loading Environment from a magic hat... OK' in response
>   
>           response = c.run_command('env info')
>           assert 'env_valid = invalid' in response



More information about the U-Boot mailing list