From: James Bursa Date: Sat, 20 Jan 2007 21:58:51 +0000 (+0100) Subject: adfs: fix filename handling X-Git-Tag: v2.6.16.39-rc1~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c57c54983f560848ab6018a962762676fc9c7e6c;p=karo-tx-linux.git 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: Adrian Bunk --- diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index bbfc86259272..b9b2b27b68c3 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