Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2007 15:15:55 +0100
From:      Rene Ladan <r.c.ladan@gmail.com>
To:        fs@freebsd.org
Subject:   unused code in msdosfs_lookup.c ?
Message-ID:  <45B4C71B.1030408@gmail.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45B4C71B.1030408>