From nobody Mon Sep 02 05:02:38 2024 X-Original-To: dev-commits-src-branches@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 4WxxTB62l4z5MSW7; Mon, 02 Sep 2024 05:02:38 +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 4WxxTB5b59z4tlf; Mon, 2 Sep 2024 05:02:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725253358; 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=UdiAlk663sAyqyMYx4UP29QD7VACuBKH9HclWExmheA=; b=X50ehUTcenT/5XappHL+BwU++PzvjgGQ1S1atLkS2SzSQmVSTrkNslvPTv/mQIPqrFygrw 29E23H6klkrr7OUGfwkVd6s572coFeBzsbH0/mEqjem4fUSfwdht21CQALXmn5/HejShfR rI+Fcd6KwgihfztCd0xPI4+Qk3FU1Vwy4bHesO3XWuYo4jWvGC+d1au0vTrdbWua9d6lqB ZgPU4I9gw8vhhONqI+OnMRMZ4QdcAQtazK5B99LyQK+dXyP1vyNRD4VieeNzjDt6G78GRk KGL+SNTL7tmqkrr3p3YYOgTzxH6fON0MNg1YmjhIVlhkhPnzHIAt1B138/tQ8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725253358; a=rsa-sha256; cv=none; b=Nd72y/0Gl4xlILNAkxuuZ6aSM3eGwVuVQkm1dI8A2GOtas5JIV/vc0I2K+E99YGwtV4KcH 4fVAyzPCB+IW6BYsa5UpJj/PI73K51SGSPwldWNU9C7A6yQEChUyR3QBbRBvRm0RJrO2PC UI8Mhee5Q+IXD4cJznzSaqQr/h7FQNVuovt/g9eqD8M9F4/Iu8CGYQV6rwCRCI9a39F2l2 F+TzU0Rb0hvjmMbsy64IkAM8Uhw34f4v3N62sh6E5cc9K13QpHayPaAO1SKyS0w9eAEt3C +yGzsPRgI57K7uSD09r+bYsr3u6NNodDqko7ZZDboVCsFEw8u8NOuTXGhqNOlw== 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=1725253358; 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=UdiAlk663sAyqyMYx4UP29QD7VACuBKH9HclWExmheA=; b=vQcM92JjtLdAJGvMsP+L0951tZn3zaDxSkayx33TlMFW91tYBJqvVtEsS8RZaSCGo2MLTO I8OkawEp5JlsFuGp/QQnTlg399wZMrsUKHesV2+zNWMsJKm1zbutCvARlW/oTpbRJTRXhe 9sfABbNhP8O0qSeUyVG0HavWqUKUqsF6q7B2shOr0+o9Pbe8MImqK93Eq/zIqVOvO22SaP eI+H6vv20e7TrgLao18ovRq3jL6mFV3eUP1NPkEH09tPkasYjrEsNIVv9/2GQlFibg0YEY liFeZpVkcHZadVgi2q1Cim5ZvMMWywOV488Ah/STw2gj4IRzyCaScw/dL847bw== 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 4WxxTB5B7lzyyP; Mon, 2 Sep 2024 05:02:38 +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 48252cHI024179; Mon, 2 Sep 2024 05:02:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48252chY024176; Mon, 2 Sep 2024 05:02:38 GMT (envelope-from git) Date: Mon, 2 Sep 2024 05:02:38 GMT Message-Id: <202409020502.48252chY024176@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: d6271b6507b2 - stable/14 - kern: Align the declaration of kernconfstring with its definition List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/14 X-Git-Reftype: branch X-Git-Commit: d6271b6507b2404bd03f21f76a4e8394e083ae80 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d6271b6507b2404bd03f21f76a4e8394e083ae80 commit d6271b6507b2404bd03f21f76a4e8394e083ae80 Author: Zhenlei Huang AuthorDate: 2024-08-22 10:00:34 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-02 05:01:40 +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) --- 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 8ce09a47ef58..10bf4cde6489 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -460,10 +460,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