[PATCH] adfs: fix filename handling
authorJames Bursa <james@zamez.org>
Sat, 6 Jan 2007 00:36:28 +0000 (16:36 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 6 Jan 2007 07:55:22 +0000 (23:55 -0800)
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 <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/adfs/dir_f.c

index bbfc862..b9b2b27 100644 (file)
@@ -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