unused code in msdosfs_lookup.c ?
Rene Ladan
r.c.ladan at gmail.com
Mon Jan 22 14:43:22 UTC 2007
Hi,
while working on the XTAF fs module (see the archives), I discovered
that the code path in the lookup() routine which deals with
cnp->cn_nameptr being "." or ".." is never used.
To verify this, I added a printf() to the analogous code in
sys/fs/msdosfs/msdosfs_lookup.c (lines 134-145, revision 1.47), but the
following commands could not trigger the code:
% ls .
% ls ..
% file .
% file ../.
% hd .
% hd ..
% cd ..
% cd ../a/b
% ls -laoT .
% du /mountpoint
This code fakes the "." and ".." entries in the root directory of msdos
filesystems, which are otherwise absent.
So it seems like that code was either never tested or something in the
calling code changed (which would be cachedlookup() in VOP layer).
Ideas?
Regards,
Rene
--
GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6
(subkeys.pgp.net)
"It won't fit on the line."
-- me, 2001
More information about the freebsd-fs
mailing list