From 9fa007d35dd3ab231034e766f643510c5976ffc9 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Wed, 22 Mar 2023 17:24:41 +0100 Subject: [PATCH] Fix build on FreeBSD Constify some variables after d1807f168edd09ca26a5a0c6b570686b982808ad. Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Reviewed-by: Tino Reichardt Reviewed-by: Richard Yao Signed-off-by: Pawel Jakub Dawidek Closes #14656 --- module/os/freebsd/zfs/spa_os.c | 2 +- module/os/freebsd/zfs/vdev_geom.c | 2 +- module/os/freebsd/zfs/zfs_ioctl_os.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/os/freebsd/zfs/spa_os.c b/module/os/freebsd/zfs/spa_os.c index 449c1624817e..1b9f1a4ec9dc 100644 --- a/module/os/freebsd/zfs/spa_os.c +++ b/module/os/freebsd/zfs/spa_os.c @@ -184,7 +184,7 @@ spa_import_rootpool(const char *name, bool checkpointrewind) spa_t *spa; vdev_t *rvd; nvlist_t *config, *nvtop; - char *pname; + const char *pname; int error; /* diff --git a/module/os/freebsd/zfs/vdev_geom.c b/module/os/freebsd/zfs/vdev_geom.c index fef6a1b88e36..196d67b4b595 100644 --- a/module/os/freebsd/zfs/vdev_geom.c +++ b/module/os/freebsd/zfs/vdev_geom.c @@ -543,7 +543,7 @@ process_vdev_config(nvlist_t ***configs, uint64_t *count, nvlist_t *cfg, uint64_t pool_guid; uint64_t vdev_guid; uint64_t id, txg, known_txg; - char *pname; + const char *pname; if (nvlist_lookup_string(cfg, ZPOOL_CONFIG_POOL_NAME, &pname) != 0 || strcmp(pname, name) != 0) diff --git a/module/os/freebsd/zfs/zfs_ioctl_os.c b/module/os/freebsd/zfs/zfs_ioctl_os.c index 7f7e2b72c51a..8f44cced5d95 100644 --- a/module/os/freebsd/zfs/zfs_ioctl_os.c +++ b/module/os/freebsd/zfs/zfs_ioctl_os.c @@ -99,7 +99,7 @@ zfs_ioc_nextboot(const char *unused, nvlist_t *innvl, nvlist_t *outnvl) char name[MAXNAMELEN]; spa_t *spa; vdev_t *vd; - char *command; + const char *command; uint64_t pool_guid; uint64_t vdev_guid; int error;