diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-10-08 14:56:13 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-06 10:58:54 +0100 |
commit | 70e718baa1b2ae8e478df67397e759457acddcd4 (patch) | |
tree | 1bcff8b517c1df5b4c230684f4904bf5fffdcd85 /common/startup.c | |
parent | eb3ef18c8cac32bee1b59865c6b29847882f9f85 (diff) | |
download | barebox-70e718baa1b2ae8e478df67397e759457acddcd4.tar.gz barebox-70e718baa1b2ae8e478df67397e759457acddcd4.tar.xz |
environment: Only save changes to the defaultenv
Instead of storing the complete files with a 'saveenv' command
only store the files that have changes to the default environment.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/startup.c')
-rw-r--r-- | common/startup.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/common/startup.c b/common/startup.c index ceb597b0eb..f164142c6e 100644 --- a/common/startup.c +++ b/common/startup.c @@ -78,17 +78,12 @@ void __noreturn start_barebox(void) pr_debug("initcalls done\n"); if (IS_ENABLED(CONFIG_ENV_HANDLING)) { - int ret; char *default_environment_path = default_environment_path_get(); - ret = envfs_load(default_environment_path, "/env", 0); - - if (ret && IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT)) { - pr_err("no valid environment found on %s. " - "Using default environment\n", - default_environment_path); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT)) defaultenv_load("/env", 0); - } + + envfs_load(default_environment_path, "/env", 0); } if (IS_ENABLED(CONFIG_COMMAND_SUPPORT)) { |