Enforce PROP_ONETIME on zpool properties

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #7661
This commit is contained in:
Chunwei Chen
2017-08-14 14:28:43 -07:00
committed by Brian Behlendorf
parent 69830602de
commit edf60b8645
3 changed files with 15 additions and 9 deletions
+6
View File
@@ -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)
{