From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 25 22:50:45 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45857106566C for ; Wed, 25 Jan 2012 22:50:45 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 13C898FC15 for ; Wed, 25 Jan 2012 22:50:44 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id q0PMof11073452 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 25 Jan 2012 14:50:43 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4F208787.7050605@freebsd.org> Date: Wed, 25 Jan 2012 14:51:51 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.25) Gecko/20111213 Thunderbird/3.1.17 MIME-Version: 1.0 To: Matthias Zitzen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: kqueue and note_rename X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2012 22:50:45 -0000 On 1/25/12 10:44 AM, Matthias Zitzen wrote: > Hello list, > does anybody have an idea, how to obtain the new name of a renamed file after the note_rename event is fired. I'm not very familiar with filesystem-operations. I checked the typical functions like stat or lstat, but these functions are working only with filenames. there is no real way. the new link to the inode could come from any point in the filesystem so the only way to find it would be an exhaustive search. the only information that you could return that might make any sense would be the inode number of the new parent. That would allow you to follow the '..' links and do 'pwd' in effect. I have not checked to see if that information is returned. If it isn't it might be a really nice enhancement to see if it could be added. > > Matthias > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > >