From nobody Mon Sep 02 05:04:11 2024 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 4WxxVz51shz5MSYC; Mon, 02 Sep 2024 05:04: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 4WxxVz3ryqz4vLY; Mon, 2 Sep 2024 05:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725253451; 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=yY0dcuRZQjpV11lSlSA4U4QUEd4tAIwPmZLrrgGCPXo=; b=M96DLlo+rgVhThG6np6IDPgvhqbcgKRqFKAoOBtVhORcLiZDfBQsOJRS3Oi+MiJnstq0P8 RQcC3VG+MI0f8OLrkdt9GDQxlDUGKfQbFbeEG4aA6zH9Vvb9URxJYcA8GB9y98Ibbsnoic 0h1zZ+2ibOxQfK8q7Smm8sAa1a4AHbBlbwg08OS7xNVOBO9JL6uJPipI1eTkxxaXF0oa4h 7ia07m2u93R0iF638VpPasRg29Xp/CaCb13tnNPgN2wNnrymREdsjK1Dm85AXCn46ZQ1pN xO/BSikcP+B8ppcCpvPoNzJ+MTqy4XP+28xmeQI3TA7tTQtyht9WIzZs5JlLpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725253451; a=rsa-sha256; cv=none; b=mNJz7YdQEe9KYI73KuClHXwYBRJvksx8vvPQIYKJVoXrml+YSW7wsXyS6LkpNNPa4k8DWa b/d1nu6t9WDu01S85ULhzOZRZg9Hzgdmt36Ah0AU/X/zKWmQFPTILAKnQrnsz0a9E4/saz J00jb+TUUxsEZ3LF2gZdDB/f2AwvTKCBJ4y/F/+avgIpljuwNPKec/REYPvbq3+DcycOPr kEK8cOl2NAEKpvydw7nqkxaQiBM15yklvGInNXISmhZs4gPNYKrdCfPaNok2PDevGm2/Gg pzXjBAfahOUTq4f7IH+vXrMASk9q4uTcbeL0kV/ZfryE6jGdMAdjqvta3b4t3w== 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=1725253451; 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=yY0dcuRZQjpV11lSlSA4U4QUEd4tAIwPmZLrrgGCPXo=; b=k2ZLh2OqC+OLKLtDyeiu+/B5spUC/MpmQ7aJSi9o9C5i/k1OCeM4iV0ZqCSmyEs6ZByT64 63XKIjDmJ+yZE3XfeXP4FdABgeObCmjml0xzOZ0LMypgdbHsDOwNcBLkRgvBrLpXrc/H/U TWnRhpz9jqya1rbkhlO8a2e6Vb8/OmiN8t+gg/hFM0AdXB74AuX4lND3Rkzjof6OUauRe8 LndOzdIUSWLMwt0GCCARecPRmgaajQ4v9I5DVVUXTX0cnsd5HjA0psA7SqJJfGFKH8iT/q SHg9fLj/SLBYsk9c9EeFw0AgFxEtkP1Ly2cieV+dFcYXlvtOLbmE4qpXLbiagQ== 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 4WxxVz3SRhz1085; Mon, 2 Sep 2024 05:04: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 48254BGc024555; Mon, 2 Sep 2024 05:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48254BOf024552; Mon, 2 Sep 2024 05:04:11 GMT (envelope-from git) Date: Mon, 2 Sep 2024 05:04:11 GMT Message-Id: <202409020504.48254BOf024552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 38ffc3f3194f - stable/13 - kern: Align the declaration of kernconfstring with its definition 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 38ffc3f3194f048bbfec9b2389b975ef359d896e Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=38ffc3f3194f048bbfec9b2389b975ef359d896e commit 38ffc3f3194f048bbfec9b2389b975ef359d896e Author: Zhenlei Huang AuthorDate: 2024-08-22 10:00:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-02 05:03:41 +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 (cherry picked from commit 0f64fc6a3486454ad708f517633f930e611fd6d2) (cherry picked from commit d6271b6507b2404bd03f21f76a4e8394e083ae80) --- 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 aa4798a5a956..b2e9e06f5793 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -451,10 +451,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