Lines Matching full:hdl
108 zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
115 if (hdl != NULL)
116 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
122 if (hdl != NULL)
123 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
129 if (hdl != NULL)
130 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
136 if (hdl != NULL)
137 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
143 if (hdl != NULL)
144 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
150 if (hdl != NULL) {
153 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
158 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
163 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
169 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
174 zfs_error_aux(hdl,
180 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
186 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
191 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
196 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
201 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
206 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
211 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
238 libzfs_handle_t *hdl = zhp->zfs_hdl;
243 (void) no_memory(hdl);
255 (void) no_memory(hdl);
266 libzfs_handle_t *hdl = zhp->zfs_hdl;
269 if ((zph = zpool_open_canfail(hdl, pool_name)) != NULL) {
270 if (hdl->libzfs_pool_handles != NULL)
271 zph->zpool_next = hdl->libzfs_pool_handles;
272 hdl->libzfs_pool_handles = zph;
280 libzfs_handle_t *hdl = zhp->zfs_hdl;
281 zpool_handle_t *zph = hdl->libzfs_pool_handles;
314 zpool_free_handles(libzfs_handle_t *hdl)
316 zpool_handle_t *next, *zph = hdl->libzfs_pool_handles;
323 hdl->libzfs_pool_handles = NULL;
332 libzfs_handle_t *hdl = zhp->zfs_hdl;
336 while (zfs_ioctl(hdl, ZFS_IOC_OBJSET_STATS, zc) != 0) {
338 zcmd_expand_dst_nvlist(hdl, zc);
351 libzfs_handle_t *hdl = zhp->zfs_hdl;
356 zcmd_alloc_dst_nvlist(hdl, &zc, 0);
360 while (zfs_ioctl(hdl, ZFS_IOC_OBJSET_RECVD_PROPS, &zc) != 0) {
362 zcmd_expand_dst_nvlist(hdl, &zc);
478 make_dataset_handle(libzfs_handle_t *hdl, const char *path)
487 zhp->zfs_hdl = hdl;
489 zcmd_alloc_dst_nvlist(hdl, &zc, 0);
505 make_dataset_handle_zc(libzfs_handle_t *hdl, zfs_cmd_t *zc)
512 zhp->zfs_hdl = hdl;
706 zfs_open(libzfs_handle_t *hdl, const char *path, int types)
718 if (!zfs_validate_name(hdl, path, types, B_FALSE)) {
719 (void) zfs_error(hdl, EZFS_INVALIDNAME, errbuf);
734 if ((zhp = make_dataset_handle(hdl, path)) == NULL) {
735 (void) zfs_standard_error(hdl, errno, errbuf);
755 if ((pzhp = make_dataset_handle(hdl, dsname)) == NULL) {
756 (void) zfs_standard_error(hdl, errno, errbuf);
766 (void) zfs_error(hdl, EZFS_NOENT, errbuf);
772 (void) zfs_standard_error(hdl, errno, errbuf);
785 (void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
826 libzfs_mnttab_init(libzfs_handle_t *hdl)
828 pthread_mutex_init(&hdl->libzfs_mnttab_cache_lock, NULL);
829 assert(avl_numnodes(&hdl->libzfs_mnttab_cache) == 0);
830 avl_create(&hdl->libzfs_mnttab_cache, libzfs_mnttab_cache_compare,
835 libzfs_mnttab_update(libzfs_handle_t *hdl)
850 mtn = zfs_alloc(hdl, sizeof (mnttab_node_t));
851 mtn->mtn_mt.mnt_special = zfs_strdup(hdl, entry.mnt_special);
852 mtn->mtn_mt.mnt_mountp = zfs_strdup(hdl, entry.mnt_mountp);
853 mtn->mtn_mt.mnt_fstype = zfs_strdup(hdl, entry.mnt_fstype);
854 mtn->mtn_mt.mnt_mntopts = zfs_strdup(hdl, entry.mnt_mntopts);
857 if (avl_find(&hdl->libzfs_mnttab_cache, mtn, &where) != NULL) {
866 avl_add(&hdl->libzfs_mnttab_cache, mtn);
874 libzfs_mnttab_fini(libzfs_handle_t *hdl)
879 while ((mtn = avl_destroy_nodes(&hdl->libzfs_mnttab_cache, &cookie))
887 avl_destroy(&hdl->libzfs_mnttab_cache);
888 (void) pthread_mutex_destroy(&hdl->libzfs_mnttab_cache_lock);
892 libzfs_mnttab_cache(libzfs_handle_t *hdl, boolean_t enable)
894 hdl->libzfs_mnttab_enable = enable;
898 libzfs_mnttab_find(libzfs_handle_t *hdl, const char *fsname,
906 if (!hdl->libzfs_mnttab_enable) {
909 if (avl_numnodes(&hdl->libzfs_mnttab_cache))
910 libzfs_mnttab_fini(hdl);
922 pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock);
923 if (avl_numnodes(&hdl->libzfs_mnttab_cache) == 0) {
926 if ((error = libzfs_mnttab_update(hdl)) != 0) {
927 pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock);
933 mtn = avl_find(&hdl->libzfs_mnttab_cache, &find, NULL);
938 pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock);
943 libzfs_mnttab_add(libzfs_handle_t *hdl, const char *special,
948 pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock);
949 if (avl_numnodes(&hdl->libzfs_mnttab_cache) != 0) {
950 mtn = zfs_alloc(hdl, sizeof (mnttab_node_t));
951 mtn->mtn_mt.mnt_special = zfs_strdup(hdl, special);
952 mtn->mtn_mt.mnt_mountp = zfs_strdup(hdl, mountp);
953 mtn->mtn_mt.mnt_fstype = zfs_strdup(hdl, MNTTYPE_ZFS);
954 mtn->mtn_mt.mnt_mntopts = zfs_strdup(hdl, mntopts);
959 if (avl_find(&hdl->libzfs_mnttab_cache, mtn, NULL) != NULL) {
966 avl_add(&hdl->libzfs_mnttab_cache, mtn);
969 pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock);
973 libzfs_mnttab_remove(libzfs_handle_t *hdl, const char *fsname)
978 pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock);
980 if ((ret = avl_find(&hdl->libzfs_mnttab_cache, (void *)&find, NULL))
982 avl_remove(&hdl->libzfs_mnttab_cache, ret);
989 pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock);
1030 zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl,
1044 (void) no_memory(hdl);
1063 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1065 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1070 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1073 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1079 (void) no_memory(hdl);
1090 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1092 (void) zfs_error(hdl, EZFS_PROPTYPE, errbuf);
1106 zfs_error_aux(hdl,
1110 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1120 zfs_error_aux(hdl,
1123 (void) zfs_error(hdl, EZFS_PROPREADONLY,
1132 } else if (zfs_nicestrtonum(hdl,
1134 (void) zfs_error(hdl,
1142 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1148 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1150 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1163 (void) no_memory(hdl);
1173 (void) no_memory(hdl);
1180 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1183 (void) zfs_error(hdl, EZFS_PROPREADONLY, errbuf);
1188 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1190 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1195 zfs_error_aux(hdl,
1198 (void) zfs_error(hdl, EZFS_PROPTYPE, errbuf);
1205 zfs_error_aux(hdl,
1208 (void) zfs_error(hdl, EZFS_PROPREADONLY, errbuf);
1212 if (zprop_parse_value(hdl, elem, prop, type, ret,
1228 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1231 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1254 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1257 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1296 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1300 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1352 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1354 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1358 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1360 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1376 zfs_error_aux(hdl,
1382 zfs_error_aux(hdl,
1389 zfs_error_aux(hdl,
1395 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1421 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1425 (void) zfs_error(hdl, EZFS_ZONED,
1430 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1433 (void) zfs_error(hdl, EZFS_ZONED,
1442 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1445 (void) zfs_error(hdl, EZFS_ZONED, errbuf);
1467 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1470 (void) zfs_error(hdl, EZFS_BADPROP,
1480 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1482 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1492 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1495 (void) zfs_error(hdl, EZFS_BADPROP,
1500 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1503 (void) zfs_error(hdl, EZFS_BADPROP,
1512 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1515 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1546 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1550 (void) zfs_error(hdl, EZFS_BADPROP,
1556 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1559 (void) zfs_error(hdl, EZFS_BADPROP,
1578 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1581 (void) zfs_error(hdl, EZFS_BADPROP,
1605 (void) no_memory(hdl);
1609 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1612 (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
1617 (void) no_memory(hdl);
1758 libzfs_handle_t *hdl = zhp->zfs_hdl;
1767 (void) no_memory(hdl);
1802 libzfs_handle_t *hdl = zhp->zfs_hdl;
1814 if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props,
1874 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1877 ret = zfs_error(hdl, EZFS_ZONED, errbuf);
1894 zcmd_write_src_nvlist(hdl, &zc, nvl);
1895 zcmd_alloc_dst_nvlist(hdl, &zc, 0);
1897 ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc);
1901 (void) zfs_standard_error(hdl, errno, errbuf);
1907 if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0)
1913 zfs_setprop_error(hdl, prop, errno, errbuf);
1931 zcmd_write_src_nvlist(hdl, &zc, nvl);
1932 (void) zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc);
1983 libzfs_handle_t *hdl = zhp->zfs_hdl;
1997 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1999 return (zfs_error(hdl, EZFS_BADPROP, errbuf));
2006 return (zfs_standard_error(hdl, errno, errbuf));
2016 return (zfs_error(hdl, EZFS_PROPREADONLY, errbuf));
2019 return (zfs_error(hdl, EZFS_PROPNONINHERIT, errbuf));
2025 return (zfs_error(hdl, EZFS_PROPTYPE, errbuf));
2036 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
2038 return (zfs_error(hdl, EZFS_ZONED, errbuf));
2048 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
2051 ret = zfs_error(hdl, EZFS_ZONED, errbuf);
2060 return (zfs_standard_error(hdl, errno, errbuf));
2238 libzfs_handle_t *hdl = zhp->zfs_hdl;
2241 if (libzfs_mnttab_find(hdl, zhp->zfs_name, &entry) == 0)
2242 zhp->zfs_mntopts = zfs_strdup(hdl,
3503 check_parents(libzfs_handle_t *hdl, const char *path, uint64_t *zoned,
3518 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3520 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
3528 if (zfs_ioctl(hdl, ZFS_IOC_OBJSET_STATS, &zc) != 0 &&
3530 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3532 return (zfs_error(hdl, EZFS_NOENT, errbuf));
3536 while ((zhp = make_dataset_handle(hdl, parent)) == NULL) {
3542 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3544 return (zfs_error(hdl, EZFS_NOENT, errbuf));
3547 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3549 return (zfs_error(hdl, EZFS_NOENT, errbuf));
3551 return (zfs_standard_error(hdl, errno, errbuf));
3560 (void) zfs_standard_error(hdl, EPERM, errbuf);
3567 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3569 (void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
3584 zfs_dataset_exists(libzfs_handle_t *hdl, const char *path, zfs_type_t types)
3588 if (!zfs_validate_name(hdl, path, types, B_FALSE))
3594 if ((zhp = make_dataset_handle(hdl, path)) != NULL) {
3610 create_parents(libzfs_handle_t *hdl, char *target, int prefixlen)
3620 h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM);
3623 h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM);
3639 h = make_dataset_handle(hdl, target);
3646 if (zfs_create(hdl, target, ZFS_TYPE_FILESYSTEM,
3652 h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM);
3675 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3684 zfs_create_ancestors(libzfs_handle_t *hdl, const char *path)
3699 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3701 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
3704 if (check_parents(hdl, path, NULL, B_TRUE, &prefix) != 0)
3708 rc = create_parents(hdl, path_copy, prefix);
3721 zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
3739 if (!zfs_validate_name(hdl, path, type, B_TRUE))
3740 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
3743 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3745 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
3749 if (check_parents(hdl, path, &zoned, B_FALSE, NULL) != 0)
3759 if (zfs_dataset_exists(hdl, path, ZFS_TYPE_DATASET)) {
3760 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3762 return (zfs_error(hdl, EZFS_EXISTS, errbuf));
3779 if ((zpool_handle = zpool_open(hdl, pool_path)) == NULL)
3782 if (props && (props = zfs_valid_proplist(hdl, type, props,
3800 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3802 return (zfs_error(hdl, EZFS_BADPROP, errbuf));
3813 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3815 return (zfs_error(hdl, EZFS_BADPROP, errbuf));
3821 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3823 return (zfs_error(hdl, EZFS_BADPROP, errbuf));
3828 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3831 return (zfs_error(hdl, EZFS_BADPROP, errbuf));
3836 if (zfs_crypto_create(hdl, parent, props, NULL, B_TRUE,
3839 return (zfs_error(hdl, EZFS_CRYPTOFAILED, errbuf));
3852 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3854 return (zfs_error(hdl, EZFS_NOENT, errbuf));
3857 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3860 return (zfs_error(hdl, EZFS_BADVERSION, errbuf));
3863 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3866 return (zfs_error(hdl, EZFS_CRYPTOFAILED, errbuf));
3869 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
3871 return (zfs_error(hdl, EZFS_BADPROP, errbuf));
3878 return (zfs_error(hdl, EZFS_VOLTOOBIG,
3883 return (zfs_standard_error(hdl, errno, errbuf));
3988 zfs_destroy_snaps_nvl(libzfs_handle_t *hdl, nvlist_t *snaps, boolean_t defer)
3993 int ret = zfs_destroy_snaps_nvl_os(hdl, snaps);
4009 ret = zfs_standard_error(hdl, ret, errbuf);
4020 zfs_error_aux(hdl,
4022 ret = zfs_error(hdl, EZFS_EXISTS, errbuf);
4025 ret = zfs_standard_error(hdl, errno, errbuf);
4043 libzfs_handle_t *hdl = zhp->zfs_hdl;
4052 if (!zfs_validate_name(hdl, target, ZFS_TYPE_FILESYSTEM, B_TRUE))
4053 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4056 if (check_parents(hdl, target, &zoned, B_FALSE, NULL) != 0)
4068 if ((props = zfs_valid_proplist(hdl, type, props, zoned,
4077 if (zfs_crypto_clone_check(hdl, zhp, parent, props) != 0) {
4079 return (zfs_error(hdl, EZFS_CRYPTOFAILED, errbuf));
4123 libzfs_handle_t *hdl = zhp->zfs_hdl;
4132 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4134 return (zfs_error(hdl, EZFS_BADTYPE, errbuf));
4138 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4140 return (zfs_error(hdl, EZFS_BADTYPE, errbuf));
4143 if (!zfs_validate_name(hdl, zhp->zfs_name, zhp->zfs_type, B_TRUE))
4144 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4155 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4158 return (zfs_error(hdl, EZFS_EXISTS, errbuf));
4162 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4165 return (zfs_error(hdl, EZFS_EXISTS, errbuf));
4168 return (zfs_standard_error(hdl, ret, errbuf));
4205 zfs_snapshot_nvl(libzfs_handle_t *hdl, nvlist_t *snaps, nvlist_t *props)
4222 if (!zfs_validate_name(hdl, snapname, ZFS_TYPE_SNAPSHOT,
4227 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4240 zpool_hdl = zpool_open(hdl, pool);
4245 (props = zfs_valid_proplist(hdl, ZFS_TYPE_SNAPSHOT,
4262 (void) zfs_standard_error(hdl,
4269 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4272 (void) zfs_error(hdl, EZFS_EXISTS, errbuf);
4276 (void) zfs_standard_error(hdl, ret, errbuf);
4287 zfs_snapshot(libzfs_handle_t *hdl, const char *path, boolean_t recursive,
4300 if (!zfs_validate_name(hdl, path, ZFS_TYPE_SNAPSHOT, B_TRUE))
4301 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4308 if ((zhp = zfs_open(hdl, fsname, ZFS_TYPE_FILESYSTEM |
4320 ret = zfs_snapshot_nvl(hdl, sd.sd_nvl, props);
4496 libzfs_handle_t *hdl = zhp->zfs_hdl;
4507 if (!zfs_validate_name(hdl, zhp->zfs_name, zhp->zfs_type, B_TRUE))
4508 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4536 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4539 return (zfs_error(hdl, EZFS_CROSSTARGET,
4544 if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
4545 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4548 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4550 return (zfs_error(hdl, EZFS_BADTYPE, errbuf));
4553 if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
4554 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4557 if (check_parents(hdl, target, NULL, B_FALSE, NULL) != 0)
4564 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4566 return (zfs_error(hdl, EZFS_CROSSTARGET, errbuf));
4571 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4574 return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
4583 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4585 return (zfs_error(hdl, EZFS_ZONED, errbuf));
4620 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4623 (void) zfs_error(hdl, EZFS_ZONED, errbuf);
4652 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4655 (void) zfs_error(hdl, EZFS_EXISTS, errbuf);
4657 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
4660 (void) zfs_error(hdl, EZFS_CRYPTOFAILED, errbuf);
4723 libzfs_handle_t *hdl = zhp->zfs_hdl;
4731 if (zprop_expand_list(hdl, plp, ZFS_TYPE_DATASET) != 0)
4763 entry = zfs_alloc(hdl, sizeof (zprop_list_t));
4765 zfs_strdup(hdl, nvpair_name(elem));
4845 zfs_smb_acl_mgmt(libzfs_handle_t *hdl, char *dataset, char *path,
4858 (void) no_memory(hdl);
4871 (void) no_memory(hdl);
4876 (void) no_memory(hdl);
4879 zcmd_write_src_nvlist(hdl, &zc, nvlist);
4886 error = ioctl(hdl->libzfs_fd, ZFS_IOC_SMB_ACL, &zc);
4892 zfs_smb_acl_add(libzfs_handle_t *hdl, char *dataset,
4895 return (zfs_smb_acl_mgmt(hdl, dataset, path, ZFS_SMB_ACL_ADD,
4900 zfs_smb_acl_remove(libzfs_handle_t *hdl, char *dataset,
4903 return (zfs_smb_acl_mgmt(hdl, dataset, path, ZFS_SMB_ACL_REMOVE,
4908 zfs_smb_acl_purge(libzfs_handle_t *hdl, char *dataset, char *path)
4910 return (zfs_smb_acl_mgmt(hdl, dataset, path, ZFS_SMB_ACL_PURGE,
4915 zfs_smb_acl_rename(libzfs_handle_t *hdl, char *dataset, char *path,
4918 return (zfs_smb_acl_mgmt(hdl, dataset, path, ZFS_SMB_ACL_RENAME,
4928 libzfs_handle_t *hdl = zhp->zfs_hdl;
4940 if (zfs_ioctl(hdl, ZFS_IOC_USERSPACE_MANY, &zc) != 0) {
4952 return (zfs_standard_error_fmt(hdl, errno,
5036 libzfs_handle_t *hdl = zhp->zfs_hdl;
5055 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
5057 (void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
5060 (void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
5063 (void) zfs_standard_error(hdl, ret, errbuf);
5081 (void) zfs_error(hdl, EZFS_TAGTOOLONG, errbuf);
5084 (void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
5087 (void) zfs_error(hdl, EZFS_REFTAG_HOLD, errbuf);
5090 (void) zfs_standard_error(hdl,
5138 libzfs_handle_t *hdl = zhp->zfs_hdl;
5156 (void) zfs_error(hdl, EZFS_REFTAG_RELE, errbuf);
5158 (void) zfs_standard_error(hdl, ret, errbuf);
5178 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
5180 (void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
5183 (void) zfs_standard_error(hdl, errno, errbuf);
5196 (void) zfs_error(hdl, EZFS_REFTAG_RELE, errbuf);
5199 (void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
5202 (void) zfs_standard_error(hdl,
5215 libzfs_handle_t *hdl = zhp->zfs_hdl;
5228 err = (zfs_error(hdl, EZFS_NOMEM, zfs_strerror(errno)));
5237 if (zfs_ioctl(hdl, ZFS_IOC_GET_FSACL, &zc) != 0) {
5248 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
5250 err = zfs_error(hdl, EZFS_BADVERSION, errbuf);
5253 err = zfs_error(hdl, EZFS_BADTYPE, errbuf);
5256 err = zfs_error(hdl, EZFS_NOENT, errbuf);
5259 err = zfs_standard_error(hdl, errno, errbuf);
5266 err = zfs_standard_error_fmt(hdl, rc, dgettext(
5281 libzfs_handle_t *hdl = zhp->zfs_hdl;
5304 if (zfs_ioctl(hdl, ZFS_IOC_SET_FSACL, &zc) != 0) {
5310 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
5312 err = zfs_error(hdl, EZFS_BADVERSION, errbuf);
5315 err = zfs_error(hdl, EZFS_BADTYPE, errbuf);
5318 err = zfs_error(hdl, EZFS_NOENT, errbuf);
5321 err = zfs_standard_error(hdl, errno, errbuf);
5340 libzfs_handle_t *hdl = zhp->zfs_hdl;
5347 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
5349 err = zfs_error(hdl, EZFS_BADVERSION, errbuf);
5352 err = zfs_error(hdl, EZFS_BADTYPE, errbuf);
5355 err = zfs_error(hdl, EZFS_NOENT, errbuf);
5358 err = zfs_standard_error(hdl, errno, errbuf);