mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
env: ext4: set gd->env_valid
Add a missing initialization of gd->env_valid in env_ext4_load as it is already done in some other env device. Set gd->env_valid = ENV_VALID in env_ext4_save() and env_ext4_load(). This patch allows to have a correct information in 'env info' command. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
87dac74012
commit
286fee5062
9
env/ext4.c
vendored
9
env/ext4.c
vendored
@ -32,6 +32,8 @@
|
|||||||
#include <ext4fs.h>
|
#include <ext4fs.h>
|
||||||
#include <mmc.h>
|
#include <mmc.h>
|
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
__weak const char *env_ext4_get_intf(void)
|
__weak const char *env_ext4_get_intf(void)
|
||||||
{
|
{
|
||||||
return (const char *)CONFIG_ENV_EXT4_INTERFACE;
|
return (const char *)CONFIG_ENV_EXT4_INTERFACE;
|
||||||
@ -79,6 +81,7 @@ static int env_ext4_save(void)
|
|||||||
CONFIG_ENV_EXT4_FILE, ifname, dev, part);
|
CONFIG_ENV_EXT4_FILE, ifname, dev, part);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
gd->env_valid = ENV_VALID;
|
||||||
|
|
||||||
puts("done\n");
|
puts("done\n");
|
||||||
return 0;
|
return 0;
|
||||||
@ -124,7 +127,11 @@ static int env_ext4_load(void)
|
|||||||
goto err_env_relocate;
|
goto err_env_relocate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return env_import(buf, 1);
|
err = env_import(buf, 1);
|
||||||
|
if (!err)
|
||||||
|
gd->env_valid = ENV_VALID;
|
||||||
|
|
||||||
|
return err;
|
||||||
|
|
||||||
err_env_relocate:
|
err_env_relocate:
|
||||||
env_set_default(NULL, 0);
|
env_set_default(NULL, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user