Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Feb 2002 23:54:58 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Pawel Jakub Dawidek <nick@FreeBSD.pl>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: File name.
Message-ID:  <20020203235458.P10817@elvis.mu.org>
In-Reply-To: <20020204084939.B34994@FreeBSD.pl>; from nick@FreeBSD.pl on Mon, Feb 04, 2002 at 08:49:39AM %2B0100
References:  <20020203221137.A34994@FreeBSD.pl> <20020204084939.B34994@FreeBSD.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
* Pawel Jakub Dawidek <nick@FreeBSD.pl> [020203 23:49] wrote:
> On Sun, Feb 03, 2002 at 10:11:37PM +0100, Pawel Jakub Dawidek wrote:
> +> But how can i get file name?
> +> 
> [...]
> +> I got file name, but how can I get full path name for this file?
> +> 
> Answer that there is no way to get that will be nice too.

There is, and there isn't. :)

Since UFS allows for hardlinks a single file may have multiple
valid names.  For instance:

# cd /tmp
# echo foo > f1
# ln f1 f2
484 -rw-r--r--  2 root  wheel  4 Feb  4 01:39 f1
484 -rw-r--r--  2 root  wheel  4 Feb  4 01:39 f2

However there's a dirty way to get at it via the vfs lookup cache
entries hung off the vnode.  Paul Saab showed me a delta that
did something nasty like this, but I've got no clue as to where
it is now.


-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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