[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20120201023311.GA9716@darkstar.nay.redhat.com>
Date: Wed, 1 Feb 2012 10:33:11 +0800
From: Dave Young <dyoung@...hat.com>
To: rusty@...tcorp.com.au, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] 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@...hat.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>
---
kernel/params.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.orig/kernel/params.c 2012-01-28 16:54:57.000000000 +0800
+++ linux-2.6/kernel/params.c 2012-01-31 16:16:18.723368198 +0800
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists