From 07e95b4670dc421ec726a2b4efa97a22fe572005 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 27 Dec 2023 15:17:53 -0500 Subject: [PATCH] Fix the FreeBSD userspace build (#15716) - Mark some parameters to zpool_power*() as unused. - Add a stub zpool_disk_wait(). Fixes: a9520e6e5 ("zpool: Add slot power control, print power status") Signed-off-by: Mark Johnston Reviewed-by: Alexander Motin Reviewed-by: Tony Hutter --- cmd/zpool/os/freebsd/zpool_vdev_os.c | 7 +++++++ lib/libzutil/os/freebsd/zutil_import_os.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/cmd/zpool/os/freebsd/zpool_vdev_os.c b/cmd/zpool/os/freebsd/zpool_vdev_os.c index 9dd733989e..c57c689afa 100644 --- a/cmd/zpool/os/freebsd/zpool_vdev_os.c +++ b/cmd/zpool/os/freebsd/zpool_vdev_os.c @@ -128,6 +128,9 @@ check_file(const char *file, boolean_t force, boolean_t isspare) int zpool_power_current_state(zpool_handle_t *zhp, char *vdev) { + + (void) zhp; + (void) vdev; /* Enclosure slot power not supported on FreeBSD yet */ return (-1); } @@ -135,6 +138,10 @@ zpool_power_current_state(zpool_handle_t *zhp, char *vdev) int zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on) { + + (void) zhp; + (void) vdev; + (void) turn_on; /* Enclosure slot power not supported on FreeBSD yet */ return (ENOTSUP); } diff --git a/lib/libzutil/os/freebsd/zutil_import_os.c b/lib/libzutil/os/freebsd/zutil_import_os.c index a134c173bc..049710d398 100644 --- a/lib/libzutil/os/freebsd/zutil_import_os.c +++ b/lib/libzutil/os/freebsd/zutil_import_os.c @@ -263,3 +263,11 @@ update_vdevs_config_dev_sysfs_path(nvlist_t *config) { (void) config; } + +int +zpool_disk_wait(const char *path) +{ + + (void) path; + return (ENOTSUP); +}