aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/msdosfs/msdosfs_conv.c
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2003-12-08 08:32:20 +0000
committerMax Khon <fjoe@FreeBSD.org>2003-12-08 08:32:20 +0000
commit0f4e4130e1c622d1a720a0ab762df30f111d456c (patch)
tree6ebbe6155fc751cdfa161e601e91e193cd383576 /sys/fs/msdosfs/msdosfs_conv.c
parentea828b0636ed21d83f74d8a8987f023e14464ce9 (diff)
downloadsrc-0f4e4130e1c622d1a720a0ab762df30f111d456c.tar.gz
src-0f4e4130e1c622d1a720a0ab762df30f111d456c.zip
Make msdosfs long filenames matching case insensitive again.
PR: 59765 Submitted by: Ryuichiro Imura <imura@ryu16.org>
Notes
Notes: svn path=/head/; revision=123293
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_conv.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c
index 5c663c8e9559..728c98385b88 100644
--- a/sys/fs/msdosfs/msdosfs_conv.c
+++ b/sys/fs/msdosfs/msdosfs_conv.c
@@ -800,10 +800,12 @@ winChkName(un, unlen, chksum, pmp)
for (np = dirbuf.d_name; unlen > 0 && len > 0;) {
/*
- * Should comparison be case insensitive?
+ * Comparison must be case insensitive, because FAT disallows
+ * to look up or create files in case sensitive even when
+ * it's a long file name.
*/
- c1 = unix2winchr((const u_char **)&np, (size_t *)&len, 0, pmp);
- c2 = unix2winchr(&un, (size_t *)&unlen, 0, pmp);
+ c1 = unix2winchr((const u_char **)&np, (size_t *)&len, LCASE_BASE, pmp);
+ c2 = unix2winchr(&un, (size_t *)&unlen, LCASE_BASE, pmp);
if (c1 != c2)
return -2;
}