From owner-cvs-all@FreeBSD.ORG Tue Oct 16 22:10:25 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EDD916A420; Tue, 16 Oct 2007 22:10:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id B70C813C46B; Tue, 16 Oct 2007 22:10:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8p) with ESMTP id 214739373-1834499 for multiple; Tue, 16 Oct 2007 18:12:20 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l9GMABDM095756; Tue, 16 Oct 2007 18:10:11 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Constantine A. Murenin" Date: Tue, 16 Oct 2007 18:09:09 -0400 User-Agent: KMail/1.9.6 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710161809.10755.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 16 Oct 2007 18:10:12 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/4542/Tue Oct 16 16:31:56 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: src-committers@freebsd.org, Alexander Leidinger , cvs-src@freebsd.org, cvs-all@freebsd.org, "Constantine A. Murenin" , Poul-Henning Kamp , Wilko Bulte Subject: Re: cvs commit: src/etc Makefile sensorsd.conf src/etc/defaults rc.conf src/etc/rc.d Makefile sensorsd src/lib/libc/gen sysctl.3 src/sbin/sysctl sysctl.8 sysctl.c src/share/man/man5 rc.conf.5 src/share/man/man9 Makefile sensor_attach.9 src/sys/conf f X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 22:10:25 -0000 On Tuesday 16 October 2007 05:46:18 pm Constantine A. Murenin wrote: > On 16/10/2007, John Baldwin wrote: > > On Tuesday 16 October 2007 12:33:11 pm Alexander Leidinger wrote: > > > Constantine asked for review several times on -current. He got some > > > reviews several times for commits to perforce. He incorporated > > > suggestions from those reviews, or explained why it is like it is and > > > why he can not switch (with no replies with suggestions how to solve > > > the problems he sees with the suggestions). Now you come and ask why > > > nobody pointed out some flaws before (without telling us which > > > technical flaws you talk about). > > > > At least from my point of view this is not quite accurate as pretty much all > > my feedback to the p4 commits was ignored with basically "Well, I don't like > > doing it that way". Specifically, with regards to creating dynamic sysctl > > trees, Constantine feels that sysctl_add_oid(9) is a hack rather than > > recognizing that this is a feature of FreeBSD's sysctl system despite > > repeated e-mails on the subject. > > Dear John, > > I have specifically addressed this concern of yours just several weeks ago. > > Please see the following message, which you've never replied to: > > http://lists.freebsd.org/pipermail/p4-projects/2007-September/021121.html > > I've used the documented parts of the FreeBSD's sysctl interface to > preserve 100% userland compatibility with OpenBSD. FreeBSD already provides an interface for creating dynamic sysctl trees that is simpler than having to simulate a pseudo-tree via the .oid_handler routine. In some cases (such as kern.proc) FreeBSD still uses a function handler rather than giving each process its own sysctl node. However, in other cases (generally more recent ones, and ones not as large/performance impacting) such as dev.* or the recent proposal to give ifnet's their own nodes under 'net.if' or the like, sysctl_add_oid(9) is used. As to the process of walking sysctl trees being undocumented, it is simply missing a wrapper routine ala sysctlbyname(3) and a manpage. You could easily provide one and thus provide a facility for enumerating many different things than having several one-off oid_handler routines to enumerate subtrees. However, it is not some "backdoor" hack interface anymore than sysctlbyname(3) is. They are both equally hackish or non-hackish (depending on your point of view). > I cannot possibly > see why you would have a problem with such an approach other than for > the fact that OpenBSD is not a proprietary system with wealthy > sponsors. I think I'll let that speak for itself. -- John Baldwin