Commit 10f296cb authored by Dave Young's avatar Dave Young Committed by Rusty Russell

module: make module param bint handle nul value

Allow bint param accept nul values, just do same as bool param.
Signed-off-by: default avatarDave Young <dyoung@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent d65b4e98
......@@ -97,7 +97,8 @@ static int parse_one(char *param,
for (i = 0; i < num_params; i++) {
if (parameq(param, params[i].name)) {
/* No one handled NULL, so do it here. */
if (!val && params[i].ops->set != param_set_bool)
if (!val && params[i].ops->set != param_set_bool
&& params[i].ops->set != param_set_bint)
return -EINVAL;
pr_debug("They are equal! Calling %p\n",
params[i].ops->set);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment