Skip to content

Commit

Permalink
Windows: zpool: Add slot power control, print power status
Browse files Browse the repository at this point in the history
Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Mar 13, 2024
1 parent 9f528de commit 0db9c04
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cmd/zpool/os/windows/zpool_vdev_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,23 @@ void
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 macOS 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 macOS yet */
return (ENOTSUP);
}
7 changes: 7 additions & 0 deletions lib/libzutil/os/windows/zutil_import_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,3 +1176,10 @@ 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 0db9c04

Please sign in to comment.