From owner-svn-src-head@freebsd.org Fri May 27 12:44:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3220B4AEEF; Fri, 27 May 2016 12:44:01 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4D71AE9; Fri, 27 May 2016 12:44:01 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1b6H7J-000E2w-3U; Fri, 27 May 2016 15:43:53 +0300 Date: Fri, 27 May 2016 15:43:53 +0300 From: Slawa Olhovchenkov To: Ian Lepore Cc: Gleb Smirnoff , Hans Petter Selasky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r300718 - in head/sys: kern sys Message-ID: <20160527124353.GD39874@zxy.spb.ru> References: <201605260841.u4Q8ft9r045564@repo.freebsd.org> <20160526213716.GK58287@FreeBSD.org> <1464303288.1204.65.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464303288.1204.65.camel@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2016 12:44:02 -0000 On Thu, May 26, 2016 at 04:54:48PM -0600, Ian Lepore wrote: > On Thu, 2016-05-26 at 14:37 -0700, Gleb Smirnoff wrote: > > Hans, > > > > On Thu, May 26, 2016 at 08:41:55AM +0000, Hans Petter Selasky wrote: > > H> Author: hselasky > > H> Date: Thu May 26 08:41:55 2016 > > H> New Revision: 300718 > > H> URL: https://svnweb.freebsd.org/changeset/base/300718 > > H> > > H> Log: > > H> Add support for boolean sysctl's. > > H> > > H> Because the size of bool can be implementation defined, make a > > bool > > H> sysctl handler which handle bools. Userspace sees the bools like > > H> unsigned 8-bit integers. Values are filtered to either 1 or 0 > > upon > > H> read and write, similar to what a compiler would do. > > H> > > H> Requested by: kmacy @ > > H> Sponsored by: Mellanox Technologies > > > > Would be nice if sysctl(8) would explicitly display them as "true" or > > "false" > > instead of 0 and 1. Now the userland can't differ them from uint8_t > > oids. > > If it displayed them that way, then users would want to set them using > the true/false strings too. If you start down that path you eventually MUST, not want. This is required by /etc/rc.d/sysctl (displayed value must be match seted) > end up adding support for 0/1/true/false/yes/no/on/off, and if you > don't do that in exactly once place you end up with some oids accepting > all the values and others accepting only some of them, and the user > experience is confusing at best. > > -- Ian > > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"