From nobody Mon Nov 06 15:39:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SPFrw1SGSz502k6; Mon, 6 Nov 2023 15:39:28 +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 4SPFrw0y8pz3cSs; Mon, 6 Nov 2023 15:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699285168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B5P32vbg+CST9m73rhJRc45WClhbjPNGzSLzMphTZso=; b=kGKbMARSk94C2KeY4k8QTNYSpXEd/0bg7p/X9yLXsH9DULRhhzEuKmx2zEmFEd1UOV5SaE 6XGMN91qb0xvTUxCT7bY2/5fFIAG+V6gIDDZ00m2WH3XCujVm0RfoQVJseMOEaOZN64mOS 2FtFEr2MxAiYVaGsI7lcMhR6RitG4Wt3Nm1Wp0WUtOTpb5rf/qfTmxXD7dRCp85A9Go1mj w4HWNO3AjOfguHcMjFhUZK7jW2ZIFP0tcEc5ZCUG7rQMpJ+r60da9gEEJnLkjGHDltiEA1 1RejBoB34NQb82R/kDo6Ws3nMeDUjZNe6LbGVw2wOoGteq66Z6/INQ+TcceJ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699285168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B5P32vbg+CST9m73rhJRc45WClhbjPNGzSLzMphTZso=; b=JgMc1ZvQbkB5TU1KeqMdpnsuYWrrll6bvybQuid50iVPVMZFrHrd9rzS7mVBR7waHa0Icw hkKrFfRmxuSxmz9/I4EPyrmxukGAydaOeKzIbS4AtAHu5lbyLj709+nQWwky+fMLNwb9L2 N2f55T1YAjEWRpVvxB+eLBI/528lRePSJwu9kUWEQIr45lAqcIKoQSqLDuqK6Rk54tc0hg zwRNU0+v2tB1Ihu0PpubwiVoT5VNCa68Zn8LP+LbY4pNNizhEdKkRQ0Qz53yzenHOTVp/G 2OXuHOhTEHUa6dFFOc7UJF5f+8PvvlGJ1A/gRTh+eMVU6GnsYF/Gj1XJr06ZEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699285168; a=rsa-sha256; cv=none; b=es0d3LmoeG9P5ezR6BeDWIYg4pqidq9kxIlgyJtt3/2j7Y8amWP3q1EYc3pc+mweEx1zXp NXVH8xprfOiiPdoxJy4Bz5Rng4gnf41487G4gEaeXH1Qpw3DxIK5V/ZjkqJT0fBvFi02TL +POKH0/pCex9exdpDz76Pqtnwh3PWFV986EzCJneVPcfrnjRfyZjSnqFGJtpw0AHG7y6oI 4RNYyBF8mz4dZVjtCRJg5DPnimz4G8oT7xH6nN8Q4tq27h6//BEG0okc4dOx0g4cV6eLjt QzdW+SWhQbRDV5qsUr3JfNjmHS9jcSzM03u8E9GjhgAKnBi/yrtSmCOrTM/k6w== 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 4SPFrw00hhz1CL8; Mon, 6 Nov 2023 15:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3A6FdREh042144; Mon, 6 Nov 2023 15:39:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A6FdR1r042141; Mon, 6 Nov 2023 15:39:27 GMT (envelope-from git) Date: Mon, 6 Nov 2023 15:39:27 GMT Message-Id: <202311061539.3A6FdR1r042141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 733a66841d70 - main - Fix up the vm_guest_sysctl_names size assert. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 733a66841d70c6934f073d227db10678d6ef5226 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=733a66841d70c6934f073d227db10678d6ef5226 commit 733a66841d70c6934f073d227db10678d6ef5226 Author: Mateusz Guzik AuthorDate: 2023-11-06 15:38:06 +0000 Commit: Mateusz Guzik CommitDate: 2023-11-06 15:39:17 +0000 Fix up the vm_guest_sysctl_names size assert. As VM_LAST was included in the array, the size check had to always pass. While here modernize the assert itself. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/subr_param.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index b7dbf606f492..933bc8d645be 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -158,9 +158,9 @@ static const char *const vm_guest_sysctl_names[] = { [VM_GUEST_BHYVE] = "bhyve", [VM_GUEST_VBOX] = "vbox", [VM_GUEST_PARALLELS] = "parallels", - [VM_LAST] = NULL }; -CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST); +_Static_assert(nitems(vm_guest_sysctl_names) == VM_LAST, + "new vm guest type not added to vm_guest_sysctl_names"); /* * Boot time overrides that are not scaled against main memory