summaryrefslogtreecommitdiffstats
path: root/fs/vfat/namei.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-27 23:20:03 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-27 23:20:03 +0000
commit89eba5eb77bbf92ffed6686c951cc35f4027e71f (patch)
treeb56887b1753ca2573002bc7f60e5f3e47c33b116 /fs/vfat/namei.c
parentf7ff3f5a67747c7714c3db772d05965a0c033705 (diff)
Merge with Linux 2.4.0-test5-pre5.
Diffstat (limited to 'fs/vfat/namei.c')
-rw-r--r--fs/vfat/namei.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c
index 9c38896a3..3895b0774 100644
--- a/fs/vfat/namei.c
+++ b/fs/vfat/namei.c
@@ -453,10 +453,11 @@ static int vfat_valid_shortname(struct nls_table *nls, wchar_t *name, int len)
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 @@ static int vfat_valid_shortname(struct nls_table *nls, wchar_t *name, int len)
if (charbuf[0] != '.') return -EINVAL;
} else
return -EINVAL;
+ c = '.';
}
if (c == '.') {
if (len >= 4) return -EINVAL;
@@ -522,7 +524,7 @@ static int vfat_format_name(struct nls_table *nls, wchar_t *name,
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 @@ static int vfat_format_name(struct nls_table *nls, wchar_t *name,
walk++;
}
}
+dot:;
if (space) return -EINVAL;
if (len >= 0) {
while (walk-res < 8) *walk++ = ' ';