Skip to content

Commit 07e95b4

Browse files
authored
Fix the FreeBSD userspace build (#15716)
- 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]>
1 parent 4cf4bc7 commit 07e95b4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

cmd/zpool/os/freebsd/zpool_vdev_os.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,20 @@ check_file(const char *file, boolean_t force, boolean_t isspare)
128128
int
129129
zpool_power_current_state(zpool_handle_t *zhp, char *vdev)
130130
{
131+
132+
(void) zhp;
133+
(void) vdev;
131134
/* Enclosure slot power not supported on FreeBSD yet */
132135
return (-1);
133136
}
134137

135138
int
136139
zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on)
137140
{
141+
142+
(void) zhp;
143+
(void) vdev;
144+
(void) turn_on;
138145
/* Enclosure slot power not supported on FreeBSD yet */
139146
return (ENOTSUP);
140147
}

lib/libzutil/os/freebsd/zutil_import_os.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,11 @@ update_vdevs_config_dev_sysfs_path(nvlist_t *config)
263263
{
264264
(void) config;
265265
}
266+
267+
int
268+
zpool_disk_wait(const char *path)
269+
{
270+
271+
(void) path;
272+
return (ENOTSUP);
273+
}

0 commit comments

Comments
 (0)