From owner-freebsd-hackers Sun Feb 3 23:55: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 2E36D37B400 for ; Sun, 3 Feb 2002 23:54:59 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id EE8B910DDF7; Sun, 3 Feb 2002 23:54:58 -0800 (PST) Date: Sun, 3 Feb 2002 23:54:58 -0800 From: Alfred Perlstein To: Pawel Jakub Dawidek Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: File name. Message-ID: <20020203235458.P10817@elvis.mu.org> References: <20020203221137.A34994@FreeBSD.pl> <20020204084939.B34994@FreeBSD.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020204084939.B34994@FreeBSD.pl>; from nick@FreeBSD.pl on Mon, Feb 04, 2002 at 08:49:39AM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Pawel Jakub Dawidek [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