Skip to content

Commit

Permalink
Fix the FreeBSD userspace build (#15716)
Browse files Browse the repository at this point in the history
- Mark some parameters to zpool_power*() as unused.
- Add a stub zpool_disk_wait().

Fixes: a9520e6 ("zpool: Add slot power control, print power status")

Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
markjdb authored and behlendorf committed Feb 13, 2024
1 parent 57da499 commit 4a0d86a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/zpool/os/freebsd/zpool_vdev_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,20 @@ after_zpool_upgrade(zpool_handle_t *zhp)
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);
}

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);
}
8 changes: 8 additions & 0 deletions lib/libzutil/os/freebsd/zutil_import_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,11 @@ void
update_vdevs_config_dev_sysfs_path(nvlist_t *config)
{
}

int
zpool_disk_wait(const char *path)
{

(void) path;
return (ENOTSUP);
}

0 comments on commit 4a0d86a

Please sign in to comment.