Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2007 09:11:15 +0600
From:      Denis Eremenko <moonshade@pnhz.kz>
To:        Lowell Gilbert <lgusenet@be-well.ilk.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: fstat and filenames
Message-ID:  <1198206675.12065.5.camel@abyss.pnhz.kz>
In-Reply-To: <44mysdjrum.fsf@Lowell-Desk.lan>
References:  <1197437356.5183.24.camel@abyss.pnhz.kz> <44mysdjrum.fsf@Lowell-Desk.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

÷ ÐÔ, 14/12/2007 × 09:03 -0500, Lowell Gilbert ÐÉÛÅÔ:
> moonshade@pnhz.kz (Denis Eremenko) writes:
> 
> > Why fstat so secretive about file names and unix domain sockets?
> 
> With respect to file names, you need to remember that there may not be
> a unique answer.  A file handle's metadata doesn't keep information
> about how it was opened, just the inode.  That inode could belong to
> multiple directory entries, or none -- this is why, as the fstat(1)
> manual points out, "there is no mapping from an open file back to the
> directory entry that was used to open that file."

Yes. I clearly understand difficulties of exact inode-name mapping. And
i saw manpage note too. But doesn't _some_and_maybe_wrong_ information
better than nothing? Additionally - most files has one filesystem
record.

> As far as unix domain sockets, I don't understand the question.  Sorry.
fstat doesn't show their names too.




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