* [U-Boot] [PATCH] ubifs: Correct dereferencing of files-after-symlinks
@ 2009-09-25 12:05 Simon Kagstrom
2009-09-28 14:59 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Simon Kagstrom @ 2009-09-25 12:05 UTC (permalink / raw)
To: u-boot
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>
---
fs/ubifs/ubifs.c | 2 +-
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;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] ubifs: Correct dereferencing of files-after-symlinks
2009-09-25 12:05 [U-Boot] [PATCH] ubifs: Correct dereferencing of files-after-symlinks Simon Kagstrom
@ 2009-09-28 14:59 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-09-28 14:59 UTC (permalink / raw)
To: u-boot
On Friday 25 September 2009 14:05:57 Simon Kagstrom wrote:
> 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.
Applied to u-boot-ubi/master. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-28 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 12:05 [U-Boot] [PATCH] ubifs: Correct dereferencing of files-after-symlinks Simon Kagstrom
2009-09-28 14:59 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox