diff options
author | Brian Behlendorf <[email protected]> | 2010-12-16 15:11:40 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-04 16:14:34 -0800 |
commit | b4ead57cfb410247eee4d2a8a6e488cf4542ac77 (patch) | |
tree | feabda8e4bf4ea3a69341e3bf197a84d9ca555db /lib | |
parent | 9a616b5d17185c7fa5cd0d39ff8bc101cad8466d (diff) |
Remove HAVE_ZPL from commands and libraries
Thanks to the previous few commits we can now build all of the
user space commands and libraries with support for the zpl.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_changelist.c | 12 | ||||
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 26 | ||||
-rw-r--r-- | lib/libzfs/libzfs_mount.c | 51 | ||||
-rw-r--r-- | lib/libzfs/libzfs_util.c | 2 |
4 files changed, 0 insertions, 91 deletions
diff --git a/lib/libzfs/libzfs_changelist.c b/lib/libzfs/libzfs_changelist.c index 6f067d563..0bcfc0423 100644 --- a/lib/libzfs/libzfs_changelist.c +++ b/lib/libzfs/libzfs_changelist.c @@ -93,7 +93,6 @@ struct prop_changelist { int changelist_prefix(prop_changelist_t *clp) { -#ifdef HAVE_ZPL prop_changenode_t *cn; int ret = 0; @@ -142,9 +141,6 @@ changelist_prefix(prop_changelist_t *clp) (void) changelist_postfix(clp); return (ret); -#else - return 0; -#endif /* HAVE_ZPL */ } /* @@ -159,7 +155,6 @@ changelist_prefix(prop_changelist_t *clp) int changelist_postfix(prop_changelist_t *clp) { -#ifdef HAVE_ZPL prop_changenode_t *cn; char shareopts[ZFS_MAXPROPLEN]; int errors = 0; @@ -260,9 +255,6 @@ changelist_postfix(prop_changelist_t *clp) } return (errors ? -1 : 0); -#else - return 0; -#endif /* HAVE_ZPL */ } /* @@ -325,7 +317,6 @@ 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; @@ -340,9 +331,6 @@ changelist_unshare(prop_changelist_t *clp, zfs_share_proto_t *proto) } return (ret); -#else - return 0; -#endif } /* diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index d4b59f2ce..378bbc7b1 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -995,7 +995,6 @@ badlabel: /*FALLTHRU*/ -#ifdef HAVE_ZPL case ZFS_PROP_SHARESMB: case ZFS_PROP_SHARENFS: /* @@ -1106,7 +1105,6 @@ badlabel: } break; -#endif /* HAVE_ZPL */ case ZFS_PROP_UTF8ONLY: chosen_utf = (int)intval; break; @@ -2745,7 +2743,6 @@ create_parents(libzfs_handle_t *hdl, char *target, int prefixlen) goto ancestorerr; } -#ifdef HAVE_ZPL if (zfs_mount(h, NULL, 0) != 0) { opname = dgettext(TEXT_DOMAIN, "mount"); goto ancestorerr; @@ -2755,7 +2752,6 @@ create_parents(libzfs_handle_t *hdl, char *target, int prefixlen) opname = dgettext(TEXT_DOMAIN, "share"); goto ancestorerr; } -#endif /* HAVE_ZPL */ zfs_close(h); } @@ -4037,28 +4033,6 @@ zfs_expand_proplist(zfs_handle_t *zhp, zprop_list_t **plp, boolean_t received) return (0); } -#ifdef HAVE_ZPL -int -zfs_deleg_share_nfs(libzfs_handle_t *hdl, char *dataset, char *path, - char *resource, void *export, void *sharetab, - int sharemax, zfs_share_op_t operation) -{ - zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 }; - int error; - - (void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name)); - (void) strlcpy(zc.zc_value, path, sizeof (zc.zc_value)); - if (resource) - (void) strlcpy(zc.zc_string, resource, sizeof (zc.zc_string)); - zc.zc_share.z_sharedata = (uint64_t)(uintptr_t)sharetab; - zc.zc_share.z_exportdata = (uint64_t)(uintptr_t)export; - zc.zc_share.z_sharetype = operation; - zc.zc_share.z_sharemax = sharemax; - error = ioctl(hdl->libzfs_fd, ZFS_IOC_SHARE, &zc); - return (error); -} -#endif /* HAVE_ZPL */ - void zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) { diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c index 977b2ee31..f55b16bdc 100644 --- a/lib/libzfs/libzfs_mount.c +++ b/lib/libzfs/libzfs_mount.c @@ -84,7 +84,6 @@ #include <sys/systeminfo.h> #define MAXISALEN 257 /* based on sysinfo(2) man page */ -#ifdef HAVE_ZPL static int zfs_share_proto(zfs_handle_t *, zfs_share_proto_t *); zfs_share_type_t zfs_is_shared_proto(zfs_handle_t *, char **, zfs_share_proto_t); @@ -1343,53 +1342,3 @@ out: return (ret); } - -#else /* HAVE_ZPL */ - -int -zfs_unshare_iscsi(zfs_handle_t *zhp) -{ - return 0; -} - -int -zfs_unmount(zfs_handle_t *zhp, const char *mountpoint, int flags) -{ - return 0; -} - -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; -} - -int -zpool_enable_datasets(zpool_handle_t *zhp, const char *mntopts, int flags) -{ - return B_FALSE; -} - -int -zpool_disable_datasets(zpool_handle_t *zhp, boolean_t force) -{ - return B_FALSE; -} -#endif /* HAVE_ZPL */ diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 37dba8d39..163cd1671 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -727,9 +727,7 @@ libzfs_fini(libzfs_handle_t *hdl) #endif 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); |