[Uboot-stm32] [PATCH 2/2] env: add failing trace in env_erase
Patrice CHOTARD
patrice.chotard at foss.st.com
Tue Jan 3 14:13:29 CET 2023
Hi Patrick
On 12/14/22 16:51, Patrick Delaunay wrote:
> Add trace in env save to indicate any errors to end user and avoid
> silent output when the command 'env erase' is not executed as it is
> done in env_save with commit 8968288cb477 ("env: add failing trace in
> env_save")
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
>
> env/env.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/env/env.c b/env/env.c
> index 69848fb06080..06078c7f3744 100644
> --- a/env/env.c
> +++ b/env/env.c
> @@ -311,11 +311,15 @@ int env_erase(void)
> if (drv) {
> int ret;
>
> - if (!drv->erase)
> + if (!drv->erase) {
> + printf("not possible\n");
> return -ENODEV;
> + }
>
> - if (!env_has_inited(drv->location))
> + if (!env_has_inited(drv->location)) {
> + printf("not initialized\n");
> return -ENODEV;
> + }
>
> printf("Erasing Environment on %s... ", drv->name);
> ret = drv->erase();
Reviewed-by: Patrice Chotard <patrice.chotard at foss.st.com>
Thanks
Patrice
More information about the U-Boot
mailing list