env: Adjust the load() method to return an error
The load() methods have inconsistent behaviour on error. Some of them load an empty default environment. Some load an environment containing an error message. Others do nothing. As a step in the right direction, have the method return an error code. Then the caller could handle this itself in a consistent way. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
4
env/remote.c
vendored
4
env/remote.c
vendored
@@ -46,11 +46,13 @@ static int env_remote_save(void)
|
||||
}
|
||||
#endif /* CONFIG_CMD_SAVEENV */
|
||||
|
||||
static void env_remote_load(void)
|
||||
static int env_remote_load(void)
|
||||
{
|
||||
#ifndef ENV_IS_EMBEDDED
|
||||
env_import((char *)env_ptr, 1);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_BOOT_ENV_LOCATION(remote) = {
|
||||
|
||||
Reference in New Issue
Block a user