mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
FreeBSD: Add const qualifier to members of struct opensolaris_utsname
These members have directly references to the global variables exposed by the kernel. They are not going to be changed by this kernel module. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Zhenlei Huang <zlei@FreeBSD.org> Closes #16210
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
#include <sys/zfs_context.h>
|
||||
|
||||
static struct opensolaris_utsname hw_utsname = {
|
||||
.sysname = ostype,
|
||||
.nodename = prison0.pr_hostname,
|
||||
.release = osrelease,
|
||||
.machine = MACHINE
|
||||
};
|
||||
|
||||
@@ -49,10 +52,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user