From owner-freebsd-hackers@FreeBSD.ORG Sun May 18 18:16:49 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993D4106567A for ; Sun, 18 May 2008 18:16:49 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 4D06B8FC17 for ; Sun, 18 May 2008 18:16:49 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id m4IIGm8g037876 for ; Sun, 18 May 2008 11:16:48 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id m4IIGmCF037875 for hackers@freebsd.org; Sun, 18 May 2008 11:16:48 -0700 (PDT) (envelope-from david) Date: Sun, 18 May 2008 11:16:48 -0700 From: David Wolfskill To: hackers@freebsd.org Message-ID: <20080518181648.GA7468@bunrab.catwhisker.org> References: <20080512200901.GL66703@bunrab.catwhisker.org> <20080518170936.GB1797@roadrunner.spoerlein.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KLINyTCByxgMLuN/" Content-Disposition: inline In-Reply-To: <20080518170936.GB1797@roadrunner.spoerlein.net> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: [Patch] Using sysctl(8) to acquire info from different systems 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: Sun, 18 May 2008 18:16:49 -0000 --KLINyTCByxgMLuN/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 18, 2008 at 07:09:36PM +0200, Ulrich Spoerlein wrote: > ... > I find this functionality very useful, but the addition of another flag > as problematic. First of all, old releases don't have it. Secondly, the > behaviour you describe should be the default anyway (IMHO). Thank you for your support of the idea. I'll explain why I chose a different approach in the implementation. I agree that it would have been handy had it been the default behavior, but it hasn't been and wishing isn't likely to change that. Thus, if a change is to be seen in the older releases, *some* change will need to be made to the code for those releases. By making the change the addition of a flag, we are able to preserve the existing default behavior -- and thus avoid potentioal perception of a POLA violation. And I believe the change is easily merged from CURRENT to older releases, if someone is willing to do the commit. > So, when requesting OID a, b, and c, sysctl should print a, a warning > that it cannot find OID b (to STDERR), then print c and exit with a > return code !=3D 0. Well, the warning should be emitted in the absence of the -q flag, I expect, but in its presence, the warning should (IMO) be suppressed. > At least, that's what I would code it to do. I'd be happy for the default to be to (at least) "carry on" after finding a request for an unknown OID. I deliberately made my patch as non-invasive as I could to improve its chances of actually getting committed -- as well as the above-cited desire to avoid perception of a POLA violation. :-} And I'm hardly claiming that the approach I took is optimal, let alone the "only" one: it is an approach that I believe to be consistent with my requirements and thus serves to more clearly illustrate those requirements. BTW, I did file a PR -- it's bin/123644: Allow sysctl(8) to ignore unknown OIDs. Peace, david --=20 David H. Wolfskill david@catwhisker.org I submit that "conspiracy" would be an appropriate collective noun for cats. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --KLINyTCByxgMLuN/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkgwcpAACgkQmprOCmdXAD2T5ACfaFggw4NYBk9QpcxRuHXdnyEW 4ssAnjA6iEZcpfaIQA54d4WeYyBLRl3y =aS/v -----END PGP SIGNATURE----- --KLINyTCByxgMLuN/--