summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kagstrom <simon.kagstrom@netinsight.net>2009-09-25 14:05:57 +0200
committerStefan Roese <sr@denx.de>2009-09-28 16:58:31 +0200
commitef37c6835eac66206a9c7c11f0c7186f5d64bf91 (patch)
tree1fefce778c6ee199a700974d3313bfa769e23845
parent984f10baac8ef6032df52f135943d6b0bc96f724 (diff)
downloadu-boot-imx-ef37c6835eac66206a9c7c11f0c7186f5d64bf91.zip
u-boot-imx-ef37c6835eac66206a9c7c11f0c7186f5d64bf91.tar.gz
u-boot-imx-ef37c6835eac66206a9c7c11f0c7186f5d64bf91.tar.bz2
ubifs: Correct dereferencing of files-after-symlinks
Files in directories which are symlinked to were not dereferenced correctly in last commit. E.g., with a symlink /boot/lnk -> /boot/real_dir loading /boot/lnk/uImage will fail. This patch fixes that by simply seeing to it that the target base directory has a slash after it. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--fs/ubifs/ubifs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index b03ed0b..286739c 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -439,7 +439,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
continue;
}
/* Relative to cur dir */
- sprintf(buf, "%s%s",
+ sprintf(buf, "%s/%s",
link_name, next == NULL ? "" : next);
memcpy(symlinkpath, buf, sizeof(buf));
next = name = symlinkpath;