From owner-dev-commits-src-main@freebsd.org Wed May 5 06:35:26 2021 Return-Path: Delivered-To: dev-commits-src-main@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 CCDEE63209C; Wed, 5 May 2021 06:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FZn5V5Rplz3DH9; Wed, 5 May 2021 06:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A395220314; Wed, 5 May 2021 06:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1456ZQZT081453; Wed, 5 May 2021 06:35:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1456ZQ2E081452; Wed, 5 May 2021 06:35:26 GMT (envelope-from git) Date: Wed, 5 May 2021 06:35:26 GMT Message-Id: <202105050635.1456ZQ2E081452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9e0ba9536b7c - main - param.h: Document __FreeBSD_version better MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e0ba9536b7cbba0e81e561458e95aafb65ee485 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 06:35:26 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9e0ba9536b7cbba0e81e561458e95aafb65ee485 commit 9e0ba9536b7cbba0e81e561458e95aafb65ee485 Author: Warner Losh AuthorDate: 2021-04-22 16:44:15 +0000 Commit: Warner Losh CommitDate: 2021-05-05 06:33:56 +0000 param.h: Document __FreeBSD_version better Document what __FreeBSD_version means a bit better by documenting the sorts of events it should be bumped for. Also include a handy shorthand for what it means. Add a some advice for how frequently to change this as well. Added a note about the approved way to parse this from the param.h file, though that was not in the review. All in-tree users have been updated to this method prior to this commit. Move and reword the comment that was on the same line. Suggestions by: greg@unrelenting, arch@ Reviewed by: rgrimes@ (earlier version). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29850 --- sys/sys/param.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 92161cae13ae..a1ebced4b9a1 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -54,13 +54,29 @@ * * documentation/content/en/books/porters-handbook/versions/_index.adoc * - * scheme is: Rxx + * Encoding: Rxx * 'R' is in the range 0 to 4 if this is a release branch or * X.0-CURRENT before releng/X.0 is created, otherwise 'R' is * in the range 5 to 9. + * Short hand: MMmmXXX + * + * __FreeBSD_version is bumped every time there's a change in the base system + * that's noteworthy. A noteworthy change is any change which changes the + * kernel's KBI in -CURRENT, one that changes some detail about the system that + * external software (or the ports system) would want to know about, one that + * adds a system call, one that adds or deletes a shipped library, a secuirty + * fix, or similar change not specifically noted here. Bumps should be limited + * to one per day / a couple per week except for security fixes. + * + * The approved way to obtain this from a shell script is: + * awk '/^\#define[[:space:]]*__FreeBSD_version/ {print $3}' + * Other methods to parse this file may work, but are not guaranteed against + * future changes. The above script works back to FreeBSD 3.x when this macro + * was introduced. This number is propigated to other places needing it that + * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400013 /* Master, propagated to newvers */ +#define __FreeBSD_version 1400013 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,