summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-05-09 07:38:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-05-11 21:31:36 +0200
commita602bebcf7e42eb8933f224c12cad1c9320e28a1 (patch)
treef0ea6b74bf9e9dcf7f103c4bb9173b5dab5ffabc /commands
parent7f01c05e1e7e2cc1d9c389bd664b1b6eeaaa8ba6 (diff)
downloadbarebox-a602bebcf7e42eb8933f224c12cad1c9320e28a1.tar.gz
barebox-a602bebcf7e42eb8933f224c12cad1c9320e28a1.tar.xz
fs: Implement links to directories
So far links can only point to files. Implement links to directories. With this all kinds of links are supported: - relative links - absolute links - links including ".." - link loops (are detected, return -EMLINK) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/readlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/readlink.c b/commands/readlink.c
index 4ac576f16f..a19c8e0041 100644
--- a/commands/readlink.c
+++ b/commands/readlink.c
@@ -48,7 +48,7 @@ static int do_readlink(int argc, char *argv[])
goto err;
if (canonicalize) {
- char *buf = normalise_link(argv[optind], realname);
+ char *buf = canonicalize_path(realname);
if (!buf)
goto err;