Deleted Added
full compact
libzfs_util.c (249643) libzfs_util.c (265754)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
24 * Copyright (c) 2012 by Delphix. All rights reserved.
25 */
26
27/*
28 * Internal utility routines for the ZFS library.
29 */
30
31#include <sys/param.h>

--- 1229 unchanged lines hidden (view full) ---

1261 * Quota special: force 'none' and don't allow 0.
1262 */
1263 if ((type & ZFS_TYPE_DATASET) && *ivalp == 0 && !isnone &&
1264 (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_REFQUOTA)) {
1265 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1266 "use 'none' to disable quota/refquota"));
1267 goto error;
1268 }
25 * Copyright (c) 2012 by Delphix. All rights reserved.
26 */
27
28/*
29 * Internal utility routines for the ZFS library.
30 */
31
32#include <sys/param.h>

--- 1229 unchanged lines hidden (view full) ---

1262 * Quota special: force 'none' and don't allow 0.
1263 */
1264 if ((type & ZFS_TYPE_DATASET) && *ivalp == 0 && !isnone &&
1265 (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_REFQUOTA)) {
1266 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1267 "use 'none' to disable quota/refquota"));
1268 goto error;
1269 }
1270
1271 /*
1272 * Special handling for "*_limit=none". In this case it's not
1273 * 0 but UINT64_MAX.
1274 */
1275 if ((type & ZFS_TYPE_DATASET) && isnone &&
1276 (prop == ZFS_PROP_FILESYSTEM_LIMIT ||
1277 prop == ZFS_PROP_SNAPSHOT_LIMIT)) {
1278 *ivalp = UINT64_MAX;
1279 }
1269 break;
1270
1271 case PROP_TYPE_INDEX:
1272 if (datatype != DATA_TYPE_STRING) {
1273 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1274 "'%s' must be a string"), nvpair_name(elem));
1275 goto error;
1276 }

--- 257 unchanged lines hidden ---
1280 break;
1281
1282 case PROP_TYPE_INDEX:
1283 if (datatype != DATA_TYPE_STRING) {
1284 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
1285 "'%s' must be a string"), nvpair_name(elem));
1286 goto error;
1287 }

--- 257 unchanged lines hidden ---