From nobody Thu Aug 22 10:01:11 2024 X-Original-To: dev-commits-src-main@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 4WqJcl4tvpz5SZ6m; Thu, 22 Aug 2024 10:01:11 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WqJcl4JYBz4JXw; Thu, 22 Aug 2024 10:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724320871; 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=A96mkQTVf/kHjfuA49fZu8N0MrHWBkYbY4oXKUZSP8o=; b=pEi4yig0+uKQf0Io7xuqku3tD2BV2zVsyPS4ZtWsfJ9u47LN7/4/lJnw0wffsfBSBoUXhf jv5C6reOWo8OeJQCmpiZdy3wZyI3QNCx8/m9y9wonQzbc72E7OIu3pvyYG3bND8B+j+Dru ohw3wJT0aWFFR0nKA9tiHLRBdd48x59SEW5H57BQdj9o9vMvP7T842vYaZLhbRHX2f+Fzz c/uNxbEEkJDLv+rf7N9nhGY4JqVzV91iqMJHZUqCM0Ygjh88icayCFAXB6eZBbNVEp6BDa pBAYUGW/LS5L1V96HIfZahIpFcVeQsXB03Xi+qLm7wsn1xsCeAM7hQNOL4I2JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724320871; a=rsa-sha256; cv=none; b=XZrTfMUOAqnF4z089QG4jDA1Ya6Ch7fVTh9H5cv1LBPoQ6vQwMrUpZwxMN+sA9iZO5znsE g1yTGtti/82nBvEGUiwVZGTE4GaEkDW5gjobhQryah4IcxfAG5ShvNrCRWXv8XNKk9NMV2 PCde3kWAH+Wlemh08cbpzVt4tOS+x5E7egVs4oPmDHJsIDXaxwWJKOKLv/OpSNXUqOU7Gk k87KWXjd6hIt3f4JgqXYul0QdKkPxDOYyt+yrdA1BhJmS8S3VIK2PiTxzkwnxgZrISaw8T Cb6/XHY4/YSKuwAWW1aKALV4pk1gMfzxNiOBL0Nn3aLfLT3W4j1npZaw0/+7FQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724320871; 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=A96mkQTVf/kHjfuA49fZu8N0MrHWBkYbY4oXKUZSP8o=; b=EFIJg/aNFc/veKr9AwnVIn9okWTBLjNwn1xDO6oBfH/W3BqLTvy3wOZMek+IPnkcImrlBF 74ynkUYpfaH/q8/WZ+4Y+8+Lyumr9ZyLn34jOJ4VWtrv1CIqO5tZplr7Q4BFxwqYJNfbQ1 RTVBAKMBNaxQj5A0WKVTKYAmK4qPaZK8UBWwaJo0Ln/7NFqsOdkfkZCwJvaYojkxCQ8UvB 5qkOFTCLLx9kH1ONh2ZH7GvaUX+b0vZ+FBggKs+MmKSxl/pbq9mYD12cetxBDYjxy16dZN YokTBq1ak5MBgNa2NF1zrP04h35Bras2YwmVJ9E18JnNAwPUIgDufjAwzUpvvA== 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 4WqJcl3srWzNH4; Thu, 22 Aug 2024 10:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47MA1BJ3062858; Thu, 22 Aug 2024 10:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47MA1Bxa062855; Thu, 22 Aug 2024 10:01:11 GMT (envelope-from git) Date: Thu, 22 Aug 2024 10:01:11 GMT Message-Id: <202408221001.47MA1Bxa062855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0f64fc6a3486 - main - kern: Align the declaration of kernconfstring with its definition List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f64fc6a3486454ad708f517633f930e611fd6d2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0f64fc6a3486454ad708f517633f930e611fd6d2 commit 0f64fc6a3486454ad708f517633f930e611fd6d2 Author: Zhenlei Huang AuthorDate: 2024-08-22 10:00:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-08-22 10:00:34 +0000 kern: Align the declaration of kernconfstring with its definition It is defined as const char[] in config.c which is auto generated by usr.sbin/config/kernconf.tmpl . While here prefer macro SYSCTL_CONST_STRING to avoid casting. MFC after: 1 week --- sys/kern/kern_mib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index fe6e49865682..0132478aa68a 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -464,10 +464,10 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel, #ifdef INCLUDE_CONFIG_FILE /* Actual kernel configuration options. */ -extern char kernconfstring[]; +extern const char kernconfstring[]; -SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, - kernconfstring, 0, "Kernel configuration file"); +SYSCTL_CONST_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, + kernconfstring, "Kernel configuration file"); #endif static int