From owner-svn-src-head@freebsd.org Fri Mar 29 06:40:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F6A9155C11D; Fri, 29 Mar 2019 06:40:36 +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) Date: Fri, 29 Mar 2019 17:40:05 +1100 (EST) 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 X-Rspamd-Queue-Id: 991F181AF0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.926,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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, 29 Mar 2019 06:40:36 -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