From: James Bursa Date: Sat, 6 Jan 2007 00:36:28 +0000 (-0800) Subject: [PATCH] adfs: fix filename handling X-Git-Tag: v2.6.20-rc4~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3223ea8cca5936b8e78450dd5b8ba88372e9c0a8;p=platform%2Fkernel%2Flinux-exynos.git [PATCH] adfs: fix filename handling Fix filenames on adfs discs being terminated at the first character greater than 128 (adfs filenames are Latin 1). I saw this problem when using a loopback adfs image on a 2.6.17-rc5 x86_64 machine, and the patch fixed it there. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index bbfc862..b9b2b27 100644 --- a/fs/adfs/dir_f.c +++ b/fs/adfs/dir_f.c @@ -53,7 +53,7 @@ static inline int adfs_readname(char *buf, char *ptr, int maxlen) { char *old_buf = buf; - while (*ptr >= ' ' && maxlen--) { + while ((unsigned char)*ptr >= ' ' && maxlen--) { if (*ptr == '/') *buf++ = '.'; else