aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2012-01-31 21:33:11 -0500
committerRusty Russell <rusty@rustcorp.com.au>2012-02-13 19:32:15 -0500
commit10f296cbfe3b93188c41463fd7a53808ebdbcbe3 (patch)
treeaac97957a1759a160b5e8d0dd9b4ba59c6e7d2e0
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
module: make module param bint handle nul value
Allow bint param accept nul values, just do same as bool param. Signed-off-by: Dave Young <dyoung@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--kernel/params.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 32ee0430828..4bc965d8a1f 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -97,7 +97,8 @@ static int parse_one(char *param,
97 for (i = 0; i < num_params; i++) { 97 for (i = 0; i < num_params; i++) {
98 if (parameq(param, params[i].name)) { 98 if (parameq(param, params[i].name)) {
99 /* No one handled NULL, so do it here. */ 99 /* No one handled NULL, so do it here. */
100 if (!val && params[i].ops->set != param_set_bool) 100 if (!val && params[i].ops->set != param_set_bool
101 && params[i].ops->set != param_set_bint)
101 return -EINVAL; 102 return -EINVAL;
102 pr_debug("They are equal! Calling %p\n", 103 pr_debug("They are equal! Calling %p\n",
103 params[i].ops->set); 104 params[i].ops->set);