cvs commit: src/sys/fs/msdosfs msdosfs_lookup.c

Mike Silbersack silby at silby.com
Sun Apr 17 02:39:10 PDT 2005


On Sat, 16 Apr 2005, David Schultz wrote:

> Cool.  By the way, if you want to come up with a better fix,
> please feel free.  I think the right fix is along the lines of:
>
> 	int msdosfs_vop_lookup(dvp, vpp, cnp) {
> 		do the usual checks (dvp is VDIR, R/O FS, VOP_ACCESS(dvp));
> 		char *oldname = cnp->cn_name;
> 		char newname[12] = unix2dosfn(oldname);
> 		cnp->cn_name = newname;
> 		error = cache_lookup(dvp, vpp, cnp);
> 		cnp->cn_name = oldname;
> 		if (error /* i.e., in cache */)
> 			return (error);
> 		return (msdosfs_lookup(dvp, vpp, cnp));
> 	}
>
> I don't use msdosfs enough to adequately test this, though.

I use it every few days when transferring files to a USB flash drive, but 
that's about it.  I only became interested in it when it started 
corrupting files on me, and I only wrote the regression test for this 
case-sensitivity problem because it was so easy.

So anyway, I do not plan on messing with msdosfs internals. :)

Mike "Silby" Silbersack


More information about the cvs-src mailing list