Skip to content

Commit

Permalink
Fix the FreeBSD userspace build (openzfs#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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
  • Loading branch information
markjdb authored and tonyhutter committed Jan 30, 2024
1 parent 6914212 commit 9ef1584
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 @@ -128,13 +128,20 @@ 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);
}

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 @@ -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);
}

0 comments on commit 9ef1584

Please sign in to comment.