Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jul 2008 19:26:09 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Uladzislau Rezki <urezki@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: how can i get file name knowing its descriptor?
Message-ID:  <20080704092609.GW29380@server.vk2pj.dyndns.org>
In-Reply-To: <e4957ae10807030408tad26e7co11f6e3fb69afb01b@mail.gmail.com>
References:  <e4957ae10807030408tad26e7co11f6e3fb69afb01b@mail.gmail.com>

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

--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 <urezki@gmail.com> 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--



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