From 1533521bff4121dcd8dc37ef34fd09fc6a5018fb Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 29 Nov 2012 20:22:58 +0100 Subject: loadenv: allow more fine grained environment loading This implements two new options for the loadenv command: -s: removes (scrubs) old directory contents to be able to create a fresh environment from for example /dev/defaultenv -n: no overwrite. Do not overwrite existing files. This allows to keep parts of the old environment. Signed-off-by: Sascha Hauer --- common/startup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/startup.c') diff --git a/common/startup.c b/common/startup.c index 7bb3c73c12..14409a217d 100644 --- a/common/startup.c +++ b/common/startup.c @@ -108,12 +108,12 @@ void start_barebox (void) debug("initcalls done\n"); #ifdef CONFIG_ENV_HANDLING - if (envfs_load(default_environment_path, "/env")) { + if (envfs_load(default_environment_path, "/env", 0)) { #ifdef CONFIG_DEFAULT_ENVIRONMENT printf("no valid environment found on %s. " "Using default environment\n", default_environment_path); - envfs_load("/dev/defaultenv", "/env"); + envfs_load("/dev/defaultenv", "/env", 0); #endif } #endif -- cgit v1.2.3