mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
freebsd: add ifdefs around legacy ioctl support
Require that ZFS_LEGACY_SUPPORT be defined for legacy ioctl support to be built. For now, define it in zfs_ioctl_compat.h so support is always built. This will allow systems that need never support pre-openzfs tools a mechanism to remove support at build time. This code should be removed once the need for tool compatability is gone. No functional change at this time. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brooks Davis <brooks.davis@sri.com> Closes #14127
This commit is contained in:
committed by
Brian Behlendorf
parent
6c89cffc2c
commit
20b867f5f7
@@ -261,7 +261,9 @@ pool_active(void *unused, const char *name, uint64_t guid, boolean_t *isactive)
|
||||
(void) unused, (void) guid;
|
||||
zfs_iocparm_t zp;
|
||||
zfs_cmd_t *zc = NULL;
|
||||
#ifdef ZFS_LEGACY_SUPPORT
|
||||
zfs_cmd_legacy_t *zcl = NULL;
|
||||
#endif
|
||||
unsigned long request;
|
||||
int ret;
|
||||
|
||||
@@ -296,6 +298,7 @@ pool_active(void *unused, const char *name, uint64_t guid, boolean_t *isactive)
|
||||
umem_free(zc, sizeof (zfs_cmd_t));
|
||||
|
||||
break;
|
||||
#ifdef ZFS_LEGACY_SUPPORT
|
||||
case ZFS_IOCVER_LEGACY:
|
||||
zcl = umem_zalloc(sizeof (zfs_cmd_legacy_t), UMEM_NOFAIL);
|
||||
|
||||
@@ -311,6 +314,7 @@ pool_active(void *unused, const char *name, uint64_t guid, boolean_t *isactive)
|
||||
umem_free(zcl, sizeof (zfs_cmd_legacy_t));
|
||||
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
fprintf(stderr, "unrecognized zfs ioctl version %d", ver);
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user