From owner-svn-src-all@freebsd.org Tue Sep 3 14:06:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B12E2DBFDA; Tue, 3 Sep 2019 14:05:52 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N7yl72DLz4Nvr; Tue, 3 Sep 2019 14:05:51 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id D46AB19CDB; Tue, 3 Sep 2019 14:05:49 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 53CBA2708; Fri, 29 Mar 2019 06:40:41 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D51F81B3E; Fri, 29 Mar 2019 06:40:40 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 13F0026A1; Fri, 29 Mar 2019 06:40:40 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id AC679269A; Fri, 29 Mar 2019 06:40:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 991F181AF0; Fri, 29 Mar 2019 06:40:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 11ED543E10C; Fri, 29 Mar 2019 17:40:23 +1100 (AEDT) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ravi Pokala cc: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r345680 - head/sys/conf In-Reply-To: Message-ID: <20190329164644.X957@besplex.bde.org> References: <201903290400.x2T40kp7013212@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 cx=a_idp_d a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=v9tAofYSONCGxLRHZBoA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 3D51F81B3E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Status: O X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:06:06 -0000 X-Original-Date: Fri, 29 Mar 2019 17:40:05 +1100 (EST) X-List-Received-Date: Tue, 03 Sep 2019 14:06:06 -0000 On Thu, 28 Mar 2019, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Kyle Evans > Date: 2019-03-28, Thursday at 21:00 > To: , , > Subject: svn commit: r345680 - head/sys/conf > >> Author: kevans >> Date: Fri Mar 29 04:00:46 2019 >> New Revision: 345680 >> URL: https://svnweb.freebsd.org/changeset/base/345680 >> >> Log: >> NOTES: Use non-default value for BOOT_TAG > > Why? > > (I was on IRC when jhb debugged this, but I didn't quite get it; and of course lots of us *weren't* on IRC at the time.) Because NOTES is primarily for generating LINT, and LINT's reason for existence is to test as many cases as possible. Testing the default cases again is not very useful, so by convention NOTES never configures defaults, except of course where it is broken. This commit is to fix 1 broken place. Not repeating the default is also good for NOTES' secondary purpose of documentation. Defaults are easy to find by grepping the source code for them if there is no documentation. Changing defaults to valid and useful values requires understanding more of the source if there is no documentation. >> Modified: head/sys/conf/NOTES >> ============================================================================== >> --- head/sys/conf/NOTES Fri Mar 29 03:25:20 2019 (r345679) >> +++ head/sys/conf/NOTES Fri Mar 29 04:00:46 2019 (r345680) >> @@ -150,7 +150,7 @@ options BOOTHOWTO=RB_MULTIPLE >> # >> # Default boot tag; may use 'kern.boot_tag' loader tunable to override. The >> # current boot's tag is also exposed via the 'kern.boot_tag' sysctl. >> -options BOOT_TAG=\"---<>---\" >> +options BOOT_TAG=\"\" Useful variations are not always easy to invent. I usually just add 1 for numeric values. This example is useful. It kills the boot tag. It gives an empty tag, and the kernel does extra work to avoid printing a newline after an empty tag. >> # Maximum boot tag size the kernel's static buffer should accomodate. Maximum >> # size for both BOOT_TAG and the assocated tunable. >> options BOOT_TAG_SZ=32 This bug remains unfixed. 32 is the default. This option shouldn't exist. Instead, just use size strlen(BOOT_TAG) + 1 for the static string and keep the dynamic string in the environment. The string is only used once, and msgbufinit() already has to check both the static string and the environment to find the right string (it does this by fetching the dynamic string to overwrite the static string, but it is easier to not use a tunable or support a sysctl and just keep the dynamic string in the environment). Bruce