summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-03-29 13:50:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-04-06 14:44:19 +0200
commit46e7bfbac6fa7d674e0536e012a2cb6af16abd34 (patch)
tree1ecd41492d64d23a1faab01150bda758db72bc07 /commands
parent70d65438e5fdc8ff7505175299e2d63c0b56db03 (diff)
downloadbarebox-46e7bfbac6fa7d674e0536e012a2cb6af16abd34.tar.gz
loadenv: Do not depend on normalise_path()
normalise_path() will go away, so do without it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/loadenv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c
index 44e96c3..6469aff 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -62,20 +62,16 @@ static int do_loadenv(int argc, char *argv[])
if (argc - optind < 1) {
filename = default_environment_path_get();
} else {
- char *str = normalise_path(argv[optind]);
-
/*
* /dev/defaultenv use to contain the defaultenvironment.
* we do not have this file anymore, but maintain compatibility
* to the 'loadenv -s /dev/defaultenv' command to restore the
* default environment for some time.
*/
- if (!strcmp(str, "/dev/defaultenv"))
+ if (!strcmp(argv[optind], "/dev/defaultenv"))
defaultenv = 1;
else
filename = argv[optind];
-
- free(str);
}
if (scrub) {