Wrap more stuff in HAVE_ZPL

This commit is contained in:
Brian Behlendorf 2008-12-17 15:58:20 -08:00
parent 06005641bb
commit 9ab4c93028
4 changed files with 34 additions and 0 deletions

View File

@ -366,6 +366,7 @@ changelist_rename(prop_changelist_t *clp, const char *src, const char *dst)
int
changelist_unshare(prop_changelist_t *clp, zfs_share_proto_t *proto)
{
#ifdef HAVE_ZPL
prop_changenode_t *cn;
int ret = 0;
@ -380,6 +381,9 @@ changelist_unshare(prop_changelist_t *clp, zfs_share_proto_t *proto)
}
return (ret);
#else
return 0;
#endif
}
/*

View File

@ -3103,9 +3103,11 @@ zfs_destroy(zfs_handle_t *zhp)
* abort the request. This would only happen for a
* non-privileged user.
*/
#ifdef HAVE_ZPL
if (zfs_unshare_iscsi(zhp) != 0) {
return (-1);
}
#endif
if (zvol_remove_link(zhp->zfs_hdl, zhp->zfs_name) != 0)
return (-1);

View File

@ -1407,4 +1407,30 @@ out:
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 */

View File

@ -592,7 +592,9 @@ libzfs_fini(libzfs_handle_t *hdl)
(void) fclose(hdl->libzfs_mnttab);
if (hdl->libzfs_sharetab)
(void) fclose(hdl->libzfs_sharetab);
#ifdef HAVE_ZPL
zfs_uninit_libshare(hdl);
#endif
if (hdl->libzfs_log_str)
(void) free(hdl->libzfs_log_str);
zpool_free_handles(hdl);