From 70e718baa1b2ae8e478df67397e759457acddcd4 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 8 Oct 2014 14:56:13 +0200 Subject: 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 --- common/startup.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'common/startup.c') 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)) { -- cgit v1.2.3