Wrap more stuff in HAVE_ZPL
This commit is contained in:
parent
06005641bb
commit
9ab4c93028
|
@ -366,6 +366,7 @@ changelist_rename(prop_changelist_t *clp, const char *src, const char *dst)
|
||||||
int
|
int
|
||||||
changelist_unshare(prop_changelist_t *clp, zfs_share_proto_t *proto)
|
changelist_unshare(prop_changelist_t *clp, zfs_share_proto_t *proto)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_ZPL
|
||||||
prop_changenode_t *cn;
|
prop_changenode_t *cn;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -380,6 +381,9 @@ changelist_unshare(prop_changelist_t *clp, zfs_share_proto_t *proto)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -3103,9 +3103,11 @@ zfs_destroy(zfs_handle_t *zhp)
|
||||||
* abort the request. This would only happen for a
|
* abort the request. This would only happen for a
|
||||||
* non-privileged user.
|
* non-privileged user.
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_ZPL
|
||||||
if (zfs_unshare_iscsi(zhp) != 0) {
|
if (zfs_unshare_iscsi(zhp) != 0) {
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (zvol_remove_link(zhp->zfs_hdl, zhp->zfs_name) != 0)
|
if (zvol_remove_link(zhp->zfs_hdl, zhp->zfs_name) != 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
|
@ -1407,4 +1407,30 @@ out:
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* HAVE_ZPL */
|
||||||
|
|
||||||
|
void
|
||||||
|
remove_mountpoint(zfs_handle_t *zhp) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean_t
|
||||||
|
is_mounted(libzfs_handle_t *zfs_hdl, const char *special, char **where)
|
||||||
|
{
|
||||||
|
return B_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean_t
|
||||||
|
zfs_is_mounted(zfs_handle_t *zhp, char **where)
|
||||||
|
{
|
||||||
|
return is_mounted(zhp->zfs_hdl, zfs_get_name(zhp), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean_t
|
||||||
|
zfs_is_shared(zfs_handle_t *zhp)
|
||||||
|
{
|
||||||
|
return B_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* HAVE_ZPL */
|
#endif /* HAVE_ZPL */
|
||||||
|
|
|
@ -592,7 +592,9 @@ libzfs_fini(libzfs_handle_t *hdl)
|
||||||
(void) fclose(hdl->libzfs_mnttab);
|
(void) fclose(hdl->libzfs_mnttab);
|
||||||
if (hdl->libzfs_sharetab)
|
if (hdl->libzfs_sharetab)
|
||||||
(void) fclose(hdl->libzfs_sharetab);
|
(void) fclose(hdl->libzfs_sharetab);
|
||||||
|
#ifdef HAVE_ZPL
|
||||||
zfs_uninit_libshare(hdl);
|
zfs_uninit_libshare(hdl);
|
||||||
|
#endif
|
||||||
if (hdl->libzfs_log_str)
|
if (hdl->libzfs_log_str)
|
||||||
(void) free(hdl->libzfs_log_str);
|
(void) free(hdl->libzfs_log_str);
|
||||||
zpool_free_handles(hdl);
|
zpool_free_handles(hdl);
|
||||||
|
|
Loading…
Reference in New Issue