diff options
Diffstat (limited to 'lib/libzfs/libzfs_pool.c')
-rw-r--r-- | lib/libzfs/libzfs_pool.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index 128c6efe9..bc320e516 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -27,6 +27,7 @@ * Copyright (c) 2018 Datto Inc. * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. * Copyright (c) 2017, Intel Corporation. + * Copyright (c) 2018, loli10K <[email protected]> */ #include <errno.h> @@ -580,9 +581,9 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname, if (intval != 0 && (intval < ASHIFT_MIN || intval > ASHIFT_MAX)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "invalid '%s=%d' property: only values " - "between %" PRId32 " and %" PRId32 " " - "are allowed.\n"), + "property '%s' number %d is invalid, only " + "values between %" PRId32 " and " + "%" PRId32 " are allowed."), propname, intval, ASHIFT_MIN, ASHIFT_MAX); (void) zfs_error(hdl, EZFS_BADPROP, errbuf); goto error; @@ -720,6 +721,17 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname, goto error; } break; + case ZPOOL_PROP_DEDUPDITTO: + if (intval < ZIO_DEDUPDITTO_MIN && intval != 0) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "property '%s' value %d is invalid; only " + "values of 0 or >= %" PRId32 " are allowed " + "for this property."), + propname, intval, ZIO_DEDUPDITTO_MIN); + (void) zfs_error(hdl, EZFS_BADPROP, errbuf); + goto error; + } + break; default: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, |