From nobody Sat Sep 21 04:18:45 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 4X9bbn2vPkz5XBn5; Sat, 21 Sep 2024 04:18:45 +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 4X9bbn24Bjz40Cb; Sat, 21 Sep 2024 04:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726892325; 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=i+jffjl8Qb4e2gin+ZXoflu8OefwrD6Fy+yV3UqN1q0=; b=xuV6hiaTIBxdXX/enALFzYZZ+ANwNOeSZcSUJscvzD4v11t2enmtfw3RDTXoZTPGxUXxug wW7SuO80xsMKxErIcbWSTsYvO5xJahd0EujHuFaq5MDD/Go31jYErmbesXVYsK454r7qkG qKoeDuRNjmmH8KF2+CHk5LA556cT9vrLxAtKCdPJvMVNdV5dIH0Pvu7GffRtFRZeTaj21T vY3EUUV37YSR520fE+Y6Rb3rgYz7haNAwXIUmTagu5acCFqclLrNqwRmRmmuOaCogAG7W1 xyAYPbb8fCFq3fpT2fG88oz+wIjzUdogTJENKg6Gk/0SsLK2LuwKP+7ODk4qwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726892325; a=rsa-sha256; cv=none; b=jB7HF4IdMMDm75lfPB1TE4RWCDiymZdrTrO6CS0BSqWJTz/nx6x898xwsJze9B/t/sc5rV slheJntQRH0z21z+CmukZsupOd0x15gvDB5QJlzrnbs8rczkN5FIA1/qdLvYMz82QF0a1W K7PowyMY1/Z799AEW8ellF32++Sx311fPvJ5RzyTjBu52sLr6POEi/++s495LTIbaiidDp W+ukrv27ITmVBEn2dS971ZLr2xHGRKJMGZtEZE5uqzXsFgZYBDxW2erHg68l7wpeB5p3JP mlv8foeKy8WhgLqULBsQP9f4MPW0/dlaaHs5W0bX0yOS1Ey7ZAgoZIb21EFwfQ== 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=1726892325; 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=i+jffjl8Qb4e2gin+ZXoflu8OefwrD6Fy+yV3UqN1q0=; b=heQOcY4NvqCBLgn6kXDlHniID2EgAGCU9rREngftyK9IuUYFSr1UqaF7sZcY2TSHqt7jnq EhqVUvqyZDZ2a7riv1+JtX+gkF/iiCP4ED3wxiM8ap0pYPB6rha0XAsiZ0fkVra8aHOAJk NfQ/cwlJDVhF1IBZh+fFbn+3Fslytus9tIc1nVYTVkcmWIw/3dKejjtERhz0gh05oHWFzo bdN3QDnlaiEgRxF3RhnJ0JphX/KAa+qtTqmzskzB6VWGXAy56XROXmbsHBbQHUuexXgUI9 /04SdiZCImFBpI2YfUQmZmzgNBEGcuqEt+qVJbvFzXL1pYhrtS6UH7uxl8PSWg== 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 4X9bbn1bFkzJTD; Sat, 21 Sep 2024 04:18:45 +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 48L4IjbM010072; Sat, 21 Sep 2024 04:18:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48L4IjdA010069; Sat, 21 Sep 2024 04:18:45 GMT (envelope-from git) Date: Sat, 21 Sep 2024 04:18:45 GMT Message-Id: <202409210418.48L4IjdA010069@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: 57f268ccfc66 - stable/13 - zfs: cherry-pick change from openzfs 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: 57f268ccfc662d274d82cfc4e0e0ecb2db5d616e Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=57f268ccfc662d274d82cfc4e0e0ecb2db5d616e commit 57f268ccfc662d274d82cfc4e0e0ecb2db5d616e Author: Zhenlei Huang AuthorDate: 2024-05-30 16:58:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-21 04:16:40 +0000 zfs: cherry-pick change from openzfs Vendor PR: #16210 FreeBSD: Add const qualifier to members of struct opensolaris_utsname Obtained from: OpenZFS OpenZFS commit: e2357561b9499296bff758afe4868dbc39735675 Note: this is required by the following up MFC [1]. No functional change. 1. 356be1348dac kernel: Make some compile time constant variables const --- sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h | 10 +++++----- sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h index 3481507d2c33..1c777f5fb91e 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/misc.h @@ -45,11 +45,11 @@ #define F_SEEK_HOLE FIOSEEKHOLE struct opensolaris_utsname { - char *sysname; - char *nodename; - char *release; - char version[32]; - char *machine; + const char *sysname; + const char *nodename; + const char *release; + char version[32]; + const char *machine; }; extern char hw_serial[11]; diff --git a/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c b/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c index 0354b986cd5f..0bd7764082b3 100644 --- a/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c +++ b/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c @@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$"); #include static struct opensolaris_utsname hw_utsname = { + .sysname = ostype, + .nodename = prison0.pr_hostname, + .release = osrelease, .machine = MACHINE }; @@ -56,10 +59,6 @@ utsname(void) static void opensolaris_utsname_init(void *arg) { - - hw_utsname.sysname = ostype; - hw_utsname.nodename = prison0.pr_hostname; - hw_utsname.release = osrelease; snprintf(hw_utsname.version, sizeof (hw_utsname.version), "%d", osreldate); }