summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-03-31 12:43:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-04-12 09:54:56 +0200
commit9640c2b4a5f911a7ddd897df948ef2ffcb6723f5 (patch)
tree56f25028f3c4fc47b3d7e8340feafbce024e8e1a /commands
parentc75ab7876339bbe9c3987bc426cf60ff9b2d03f0 (diff)
downloadbarebox-9640c2b4a5f911a7ddd897df948ef2ffcb6723f5.tar.gz
environment: make default env path configurable
Normally the default path to save the environment is /dev/env0. However, we can't map a file in a fat filesystem to /dev/env0. So if we want to store the environment in a file in fat we have to make it configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/loadenv.c2
-rw-r--r--commands/saveenv.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c
index c33c34f..5568ace 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -36,7 +36,7 @@ static int do_loadenv(struct command *cmdtp, int argc, char *argv[])
else
dirname = argv[2];
if (argc < 2)
- filename = "/dev/env0";
+ filename = default_environment_path;
else
filename = argv[1];
printf("loading environment from %s\n", filename);
diff --git a/commands/saveenv.c b/commands/saveenv.c
index 2f969fe..11a9fee 100644
--- a/commands/saveenv.c
+++ b/commands/saveenv.c
@@ -41,7 +41,7 @@ static int do_saveenv(struct command *cmdtp, int argc, char *argv[])
else
dirname = argv[2];
if (argc < 2)
- filename = "/dev/env0";
+ filename = default_environment_path;
else
filename = argv[1];