From owner-freebsd-current@FreeBSD.ORG Fri Nov 9 10:47:28 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8B57CB7 for ; Fri, 9 Nov 2012 10:47:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 225188FC14 for ; Fri, 9 Nov 2012 10:47:27 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qA9AlFCi017474; Fri, 9 Nov 2012 12:47:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-DKIM: OpenDKIM Filter v2.5.2 kib.kiev.ua qA9AlFCi017474 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qA9AlFu9017473; Fri, 9 Nov 2012 12:47:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 9 Nov 2012 12:47:15 +0200 From: Konstantin Belousov To: Larry Rosenman Subject: Re: sysutils/lsof author: API work? Message-ID: <20121109104715.GA73505@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ma2IebCqBk9lYfxq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-current@freebsd.org, abe@purdue.edu X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2012 10:47:28 -0000 --Ma2IebCqBk9lYfxq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 08, 2012 at 07:01:02PM -0600, Larry Rosenman wrote: > Continuing from my thread with clang questions from Vic Abell=20 > for lsof: >=20 > Larry, >=20 > Thanks for forwarding the comments. I would be happy > to engage anyone interested in improving lsof's interface > to FreeBSD. After having participated in three previous > efforts -- HP-UX, Linux and MacOS X -- I think I know the > pros and cons of kernel dumpster diving versus an API. > It's not at all clear to me which approach is the best. So, did Vic looked at the facilities provided by sysctl kern.proc ? Most interesting for the first look are kern.proc.file. Example of the usage is available in the procstat(1) source code. Obvious missed facility of our kernel interfaces is the reporting of the advisory file locks. I will be happy to implement reasonable extensions for our introspection facilities. >=20 > As for the mistaken comment about VOP_WRITE (It was > VOP_UNLOCK) -- the reason I needed to know is that clang > objected to some of the ZFS header files that used that > macro/function without any pre-definition of it. My > hunch is that will be true of the standard FreeBSD > modules that se VOP_UNLOCK if they were to be compiled > with clang. >=20 > So, see if anyone wants to step up and work with me on > an lsof API. >=20 > Regards, >=20 > Vic >=20 > Does anyone want to work with Vic? >=20 > (I can supply a -CURRENT test box that I keep up-to-date). This is not needed, thanks. >=20 >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --Ma2IebCqBk9lYfxq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCc3zMACgkQC3+MBN1Mb4ix8ACg3+fqQu8dmdjGAr3ow0H3POh8 /x0AoINsi2IPAnYHPJ5xap5XSgE2m4h8 =cg8e -----END PGP SIGNATURE----- --Ma2IebCqBk9lYfxq--