[PATCH blktests v3 05/15] common/rc: introduce _check_conflict_and_set_default()

Daniel Wagner dwagner at suse.de
Wed Apr 24 05:27:06 PDT 2024


On Wed, Apr 24, 2024 at 04:59:45PM +0900, Shin'ichiro Kawasaki wrote:
> Following commits are going to rename some config option parameters from
> lowercase letters to uppercase. The old lowercase options will be
> deprecated but still be kept usable to not cause confusions. When these
> changes are made, it will be required to check that both new and old
> parameters are not set at once and ensure they do not have two different
> values.
> 
> To simplify the code to check the two parameters, introduce the helper
> _check_conflict_and_set_default(). If the both two parameters are
> set, it errors out. If the old option is set, it propagates the old
> option value to the new option. Also, when neither of them is set, it
> sets the default value to the new option.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>

Reviewed-by: Daniel Wagner <dwagner at suse.de>



More information about the Linux-nvme mailing list