Hi Gordon,
  it looks like that recently added 16-bit charsets added few bugs
into VFAT code. I was really surprised when I found that for
VLAKC.TTR short name is VLAKCTTR...
  I'm not VFAT guru, so please can you review this patch and
eventually fix it or send to Linus?
                                Thanks,
                                        Petr Vandrovec
                                        [EMAIL PROTECTED]




diff -urdN linux/fs/vfat/namei.c linux/fs/vfat/namei.c
--- linux/fs/vfat/namei.c       Mon Jul 24 09:34:50 2000
+++ linux/fs/vfat/namei.c       Mon Jul 24 09:38:51 2000
@@ -453,10 +453,11 @@
                        if (charbuf[chi] != vfat_tolower(nls, c)) return -EINVAL;
                        if (strchr(replace_chars,c)) return -EINVAL;
                        if (c < ' '|| c==':') return -EINVAL;
-                       if (c == '.') break;
+                       if (c == '.') goto dot;
                        space = c == ' ';
                }
        }
+dot:;
        if (space) return -EINVAL;
        if (len && c != '.') {
                len--;
@@ -464,6 +465,7 @@
                        if (charbuf[0] != '.') return -EINVAL;
                } else
                        return -EINVAL;
+               c = '.';
        }
        if (c == '.') {
                if (len >= 4) return -EINVAL;
@@ -522,7 +524,7 @@
                if (chl == 0)
                        return -EINVAL;
                for (chi = 0; chi < chl; chi++){
-                       if (charbuf[chi] == '.') break;
+                       if (charbuf[chi] == '.') goto dot;
                        if (!charbuf[chi]) return -EINVAL;
                        if (walk-res == 8) return -EINVAL;
                        if (strchr(replace_chars,charbuf[chi])) return -EINVAL;
@@ -532,6 +534,7 @@
                        walk++;
                }
        }
+dot:;
        if (space) return -EINVAL;
        if (len >= 0) {
                while (walk-res < 8) *walk++ = ' ';

Reply via email to