diff options
author | LOLi <[email protected]> | 2016-10-26 01:17:47 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-10-25 16:17:47 -0700 |
commit | e4010f2719e3381ae15563d50b99e51ffe2b2168 (patch) | |
tree | 9504e43ef804991a8f576d8df29339738692d711 /lib | |
parent | 16fa68f07d268192552693f83a747c9141ea726b (diff) |
Allow for '-o feature@<feature>=disabled' on the command line
Sometimes it is desirable to specifically disable one or several
features directly on the 'zpool create' command line.
$ zpool create -o feature@<feature>=disabled ...
Original-patch-by: Turbo Fredriksson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #3460
Closes #5142
Closes #5324
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_pool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index 0641c1844..6727a77e7 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -502,10 +502,11 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname, } (void) nvpair_value_string(elem, &strval); - if (strcmp(strval, ZFS_FEATURE_ENABLED) != 0) { + if (strcmp(strval, ZFS_FEATURE_ENABLED) != 0 && + strcmp(strval, ZFS_FEATURE_DISABLED) != 0) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "property '%s' can only be set to " - "'enabled'"), propname); + "'enabled' or 'disabled'"), propname); (void) zfs_error(hdl, EZFS_BADPROP, errbuf); goto error; } |