diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:17 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:31:24 -0400 |
commit | c5951991942330c129f3b181e94969d7c01e9abb (patch) | |
tree | 39b5ee4ee37e5a595e088456e792d7251f7ee1ca /env/remote.c | |
parent | 21f639446d6bccb6cc550140d36bd3ebd74fcee8 (diff) |
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>
Diffstat (limited to 'env/remote.c')
-rw-r--r-- | env/remote.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/env/remote.c b/env/remote.c index 0d8865bd677..c013fdd4b01 100644 --- a/env/remote.c +++ b/env/remote.c @@ -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) = { |