mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <turbo@bayour.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #3460 Closes #5142 Closes #5324
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user