aboutsummaryrefslogtreecommitdiffstats
path: root/module/zcommon/zpool_prop.c
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2017-08-14 14:28:43 -0700
committerBrian Behlendorf <[email protected]>2018-06-28 14:49:17 -0700
commitedf60b864505497dc8c4f09d4ce2190c72f1e2c2 (patch)
tree25a0377164459fb001a530cd49ec025a7c7e4388 /module/zcommon/zpool_prop.c
parent69830602de2d836013a91bd42cc8d36bbebb3aae (diff)
Enforce PROP_ONETIME on zpool properties
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #7661
Diffstat (limited to 'module/zcommon/zpool_prop.c')
-rw-r--r--module/zcommon/zpool_prop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c
index dc0bb59bc..263d043cc 100644
--- a/module/zcommon/zpool_prop.c
+++ b/module/zcommon/zpool_prop.c
@@ -171,6 +171,12 @@ zpool_prop_readonly(zpool_prop_t prop)
return (zpool_prop_table[prop].pd_attr == PROP_READONLY);
}
+boolean_t
+zpool_prop_setonce(zpool_prop_t prop)
+{
+ return (zpool_prop_table[prop].pd_attr == PROP_ONETIME);
+}
+
const char *
zpool_prop_default_string(zpool_prop_t prop)
{