diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-07-29 13:12:40 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-03 21:18:12 +0200 |
commit | 4ac9a459cd84ab317192972f1e821a8a38569c17 (patch) | |
tree | 14786af3d35dff36ebb1b9ee88900ce4c6cc7227 /scripts | |
parent | 08213f5568a871fbdc2d878f2589f75c05eb0985 (diff) | |
download | barebox-4ac9a459cd84ab317192972f1e821a8a38569c17.tar.gz barebox-4ac9a459cd84ab317192972f1e821a8a38569c17.tar.xz |
scripts/rsatoc: fix printing of error message, if environment variable doen't contain a path
Fixes: 128ad3cbe043 ("scripts: Add rsatoc tool")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rsatoc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c index 6473802140..8f2eb8fded 100644 --- a/scripts/rsatoc.c +++ b/scripts/rsatoc.c @@ -471,10 +471,12 @@ int main(int argc, char *argv[]) path++; if (!strncmp(path, "__ENV__", 7)) { - path = getenv(path + 7); + const char *orig_path = path; + + path = getenv(orig_path + 7); if (!path) { fprintf(stderr, "%s doesn't contain a path\n", - path + 7); + orig_path + 7); exit(1); } } |