Lines Matching +defs:val +defs:target

65     zprop_source_t *src, char **source, uint64_t *val,
2818 char **source, uint64_t *val, boolean_t get_persistent,
2897 *val = getprop_uint64(zhp, prop, source);
2902 if (hasmntopt(&mnt, mntopt_on) && !*val) {
2906 *val = B_TRUE;
2910 } else if (hasmntopt(&mnt, mntopt_off) && *val) {
2914 *val = B_FALSE;
2927 *val = getprop_uint64(zhp, prop, source);
2936 *val = (zhp->zfs_mntopts != NULL);
2940 *val = ((zhp->zfs_mntopts != NULL) &&
2945 *val = zhp->zfs_dmustats.dds_num_clones;
2963 val) != 0) {
2976 *val = getprop_uint64(zhp, prop, source);
3194 uint64_t val;
3249 val = getprop_uint64(zhp, prop, &source);
3250 time_t time = (time_t)val;
3253 if (val == 0) {
3259 (void) snprintf(propbuf, proplen, "%llu", val);
3477 if (get_numeric_property(zhp, prop, src, &source, &val,
3484 if (val & pi->pi_value) {
3608 if (get_numeric_property(zhp, prop, src, &source, &val,
3618 if (val == 0) {
3626 (u_longlong_t)val);
3628 zfs_nicenum(val, propbuf, proplen);
3633 if (get_numeric_property(zhp, prop, src, &source, &val,
3637 (u_longlong_t)(val / 100),
3638 (u_longlong_t)(val % 100));
3667 if (get_numeric_property(zhp, prop, src, &source, &val,
3670 if (val)
3768 &source, &val, flags.persistent,
3773 (u_longlong_t)val);
3775 zfs_nicenum(val, propbuf, proplen);
3785 &source, &val, flags.persistent,
3788 if (zfs_prop_index_to_string(prop, val, &strval) != 0)
4089 uint64_t val;
4091 (void) get_numeric_property(zhp, prop, NULL, &source, &val, B_FALSE,
4094 return (val);
4098 zfs_prop_set_int(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t val)
4102 (void) snprintf(buf, sizeof (buf), "%llu", (longlong_t)val);
4771 * Given a path to 'target', create all the ancestors between
4772 * the prefixlen portion of the path, and the target itself.
4776 create_parents(libzfs_handle_t *hdl, char *target, int prefixlen)
4783 cp = target + prefixlen;
4786 h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM);
4789 h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM);
4800 for (cp = target + prefixlen + 1;
4806 h = make_dataset_handle(hdl, target);
4815 if (zfs_create(hdl, target, ZFS_TYPE_FILESYSTEM,
4823 h = zfs_open(hdl, target, ZFS_TYPE_FILESYSTEM);
4846 "failed to %s ancestor '%s'"), opname, target);
5196 * Clones the given dataset. The target must be of the same type as the source.
5199 zfs_clone(zfs_handle_t *zhp, const char *target, nvlist_t *props)
5212 "cannot create '%s'"), target);
5214 /* validate the target name */
5215 if (!zfs_validate_name(hdl, target, ZFS_TYPE_FILESYSTEM, B_TRUE))
5219 if (zfs_check_parents(hdl, target, &zoned, B_FALSE, NULL) != 0)
5222 (void) zfs_parent_name(target, parent, sizeof (parent));
5245 (void) strlcpy(zc.zc_name, target, sizeof (zc.zc_name));
5275 * that doesn't exist anymore, or whether the target
5284 "source and target pools differ"));
5366 /* validate the target name */
5485 * Any snapshots more recent than the target are destroyed, along with
5613 zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive)
5628 if (strcmp(zhp->zfs_name, target) == 0)
5632 "cannot rename to '%s'"), target);
5635 * Make sure the target name is valid
5639 if ((strchr(target, '@') == NULL) || *target == '@') {
5641 * Snapshot target name is abbreviated,
5647 if (strchr(target, '@') == NULL)
5651 (void) strlcat(parent, target, sizeof (parent));
5652 target = parent;
5657 delim = strchr(target, '@');
5658 if (strncmp(zhp->zfs_name, target, delim - target)
5659 != 0 || zhp->zfs_name[delim - target] != '@') {
5667 if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
5689 } else if (zfs_is_auto_share_name(target) ||
5690 strcmp(target, "%") == 0) {
5696 if (zfs_const_share_delimiter(target) == NULL ||
5697 *target == '%') {
5699 * The share target name is abbreviated, so reconstruct
5701 * specified as the target accidentally, disallow '/'.
5707 if (*target != '%' && strchr(target, '/') != NULL) {
5709 "the target of a share rename cannot be a "
5719 if (*target == '%')
5720 target++;
5721 (void) strlcat(parent, target, sizeof (parent));
5722 target = parent;
5727 const char *cp = zfs_const_share_delimiter(target);
5728 if (strncmp(zhp->zfs_name, target, cp - target)
5729 != 0 || zhp->zfs_name[cp - target] != '%') {
5736 if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
5738 targetname = zfs_const_share_delimiter(target);
5740 targetname = target;
5758 if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
5762 if (zfs_check_parents(hdl, target, NULL, B_FALSE, NULL) != 0)
5766 verify((delim = strchr(target, '/')) != NULL);
5767 if (strncmp(zhp->zfs_name, target, delim - target) != 0 ||
5768 zhp->zfs_name[delim - target] != '/') {
5775 if (is_descendant(zhp->zfs_name, target)) {
5824 (nvlist_add_string(nvl, zpd->zpd_name, target))
5845 (void) strlcpy(zc.zc_value, target, sizeof (zc.zc_value));
5889 changelist_rename(cl, zfs_get_name(zhp), target);