diff options
author | Brian Behlendorf <[email protected]> | 2015-10-01 16:37:02 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-17 11:00:42 -0700 |
commit | ebecfcd6991bebe71511cb8fd409112798f203b2 (patch) | |
tree | b357cf6e49d118827ab754fbec2b8287c3b79e50 | |
parent | 83025286175d1ee1c29b842531070f3250a172ba (diff) |
zhack: Add 'feature enable' force option
Add a force option to allow zhack to add features which are
part of the known set of supported features. By default
this is disabled.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #3878
-rw-r--r-- | cmd/zhack/zhack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/zhack/zhack.c b/cmd/zhack/zhack.c index 10dd8642e..32d29fd44 100644 --- a/cmd/zhack/zhack.c +++ b/cmd/zhack/zhack.c @@ -357,8 +357,10 @@ zhack_do_feature_enable(int argc, char **argv) zhack_spa_open(target, B_FALSE, FTAG, &spa); mos = spa->spa_meta_objset; - if (zfeature_is_supported(feature.fi_guid)) - fatal(spa, FTAG, "'%s' is a real feature, will not enable"); + if (zfeature_is_supported(feature.fi_guid) && (g_force == B_FALSE)) + fatal(spa, FTAG, + "'%s' is a real feature, will not enable\n" + "provide the -f option to force override", feature.fi_guid); if (0 == zap_contains(mos, spa->spa_feat_desc_obj, feature.fi_guid)) fatal(spa, FTAG, "feature already enabled: %s", feature.fi_guid); |