diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-29 13:50:57 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-04-06 14:44:19 +0200 |
commit | 46e7bfbac6fa7d674e0536e012a2cb6af16abd34 (patch) | |
tree | 1ecd41492d64d23a1faab01150bda758db72bc07 /commands/loadenv.c | |
parent | 70d65438e5fdc8ff7505175299e2d63c0b56db03 (diff) | |
download | barebox-46e7bfbac6fa7d674e0536e012a2cb6af16abd34.tar.gz barebox-46e7bfbac6fa7d674e0536e012a2cb6af16abd34.tar.xz |
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/loadenv.c')
-rw-r--r-- | commands/loadenv.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c index 44e96c3b60..6469affadb 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) { |