summaryrefslogtreecommitdiff
path: root/usr/src/lib/libzfs/common/libzfs_dataset.c
diff options
context:
space:
mode:
authorgw25295 <none@none>2008-07-07 10:11:14 -0700
committergw25295 <none@none>2008-07-07 10:11:14 -0700
commit15e6edf145a9c2bb0e0272cf8debe823bb97529b (patch)
treea53f47c7441c48d1296ddc5dbf37e0f189969e90 /usr/src/lib/libzfs/common/libzfs_dataset.c
parent0430f8daa551890e0788d3fd28aef3be44cf8730 (diff)
downloadillumos-gate-15e6edf145a9c2bb0e0272cf8debe823bb97529b.tar.gz
6721094 Setting certain properties on root pools should not be allowed
Diffstat (limited to 'usr/src/lib/libzfs/common/libzfs_dataset.c')
-rw-r--r--usr/src/lib/libzfs/common/libzfs_dataset.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c
index c5dea6f583..9841729056 100644
--- a/usr/src/lib/libzfs/common/libzfs_dataset.c
+++ b/usr/src/lib/libzfs/common/libzfs_dataset.c
@@ -1868,6 +1868,17 @@ zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval)
(void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
break;
+ case ERANGE:
+ if (prop == ZFS_PROP_COMPRESSION) {
+ (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "property setting is not allowed on "
+ "bootable datasets"));
+ (void) zfs_error(hdl, EZFS_NOTSUP, errbuf);
+ } else {
+ (void) zfs_standard_error(hdl, errno, errbuf);
+ }
+ break;
+
case EOVERFLOW:
/*
* This platform can't address a volume this big.