diff options
author | msmith <msmith@FreeBSD.org> | 1998-02-26 06:45:46 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1998-02-26 06:45:46 +0000 |
commit | 4abe3410e6b7490667772d899fd8b5f41416c487 (patch) | |
tree | e46a6730f5f210b692d0353ccc3fda2be11d7531 /sys/msdosfs/msdosfs_lookup.c | |
parent | 15e6194107ac825d2decda9954710a2fbbbe591d (diff) | |
download | FreeBSD-src-4abe3410e6b7490667772d899fd8b5f41416c487.zip FreeBSD-src-4abe3410e6b7490667772d899fd8b5f41416c487.tar.gz |
Fixes for some bugs in the VFAT/FAT32 support:
- 'mv longnamedfile1 longnamedfile2' would cause longnamedfile2 to lose its
long name.
- Long names have trailing spaces/dots stripped for lookup as well as
assignment.
- A lockup when the mdsosfs was accessed from within the Linux emulator is fixed.
- A bug whereby long filenames were recognised by Microsoft operating systems but
not FreeBSD is fixed.
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Diffstat (limited to 'sys/msdosfs/msdosfs_lookup.c')
-rw-r--r-- | sys/msdosfs/msdosfs_lookup.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c index 94b3708..54bcce1 100644 --- a/sys/msdosfs/msdosfs_lookup.c +++ b/sys/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_lookup.c,v 1.20 1998/02/23 16:44:30 ache Exp $ */ +/* $Id: msdosfs_lookup.c,v 1.21 1998/02/24 14:13:13 ache Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */ /*- @@ -114,6 +114,7 @@ msdosfs_lookup(ap) int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; struct proc *p = cnp->cn_proc; + int unlen; int wincnt = 1; int chksum = -1; @@ -170,6 +171,7 @@ msdosfs_lookup(ap) } if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME) wincnt = 1; + unlen = winLenFixup(cnp->cn_nameptr, cnp->cn_namelen); /* * Suppress search for slots unless creating @@ -255,7 +257,7 @@ msdosfs_lookup(ap) continue; chksum = winChkName((const u_char *)cnp->cn_nameptr, - cnp->cn_namelen, + unlen, (struct winentry *)dep, chksum, pmp->pm_flags & MSDOSFSMNT_U2WTABLE, @@ -292,7 +294,7 @@ msdosfs_lookup(ap) * this lookup. */ dp->de_fndoffset = diroff; - dp->de_fndcnt = 0; /* unused anyway */ + dp->de_fndcnt = wincnt; goto found; } |