cmd: env: check real location for env info command
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 19 Jun 2020 12:03:35 +0000 (14:03 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 26 Jul 2020 18:35:30 +0000 (14:35 -0400)
commit2f96b3238ca330897b8eb5bde82db2da2c07effb
tree1d872f72a499dead0dcd4b66caf4e5da3c6abf06
parent6718ebd0327a255c6e3e840c3105ee397c8c0326
cmd: env: check real location for env info command

Check the current ENV location, dynamically provided by the weak
function env_get_location to be sure that the environment can be
persistent.

The compilation flag ENV_IS_IN_DEVICE is not enough when the board
dynamically select the available storage location (according boot
device for example).

This patch solves issue for stm32mp1 platform, when the boot device
is USB.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
cmd/nvedit.c
include/env_internal.h