From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 4 09:26:13 2008 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 4C8591065671 for ; Fri, 4 Jul 2008 09:26:13 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id D31948FC14 for ; Fri, 4 Jul 2008 09:26:12 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m649Q9fp004840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jul 2008 19:26:10 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.2) with ESMTP id m649Q9QQ034021; Fri, 4 Jul 2008 19:26:09 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m649Q95v034020; Fri, 4 Jul 2008 19:26:09 +1000 (EST) (envelope-from peter) Date: Fri, 4 Jul 2008 19:26:09 +1000 From: Peter Jeremy To: Uladzislau Rezki Message-ID: <20080704092609.GW29380@server.vk2pj.dyndns.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mhOzvPhkurUs4vA9" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: how can i get file name knowing its descriptor? 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: Fri, 04 Jul 2008 09:26:13 -0000 --mhOzvPhkurUs4vA9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Jul-03 14:08:12 +0300, Uladzislau Rezki wrote: >I've been writing a small kernel module, that provides information about >modification of the filesystem to user_land/userspace through the >character device. I'm using FreeBSD 4.10 4.10 has not been supported for several years now. I strongly recommend you look at upgrading to at least 6.3. >So, my question is: Is there any way to get file name knowing its descript= or? The simple answer is no. That said, you could try having a look at how lsof works (whilst it runs in userland, it needs to grovel around in the kernel datastructures much the same as your module would need to. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --mhOzvPhkurUs4vA9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkht7LEACgkQ/opHv/APuIei/wCgwmLXG49ddTsdzl4ULNRFNVo8 HckAnA0aJrch8lQqj0iVWefuE3NmBBp6 =G6Lf -----END PGP SIGNATURE----- --mhOzvPhkurUs4vA9--