diff options
author | Luis R. Rodriguez <mcgrof@suse.com> | 2015-05-27 04:39:38 +0300 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-05-28 05:02:11 +0300 |
commit | d19f05d8a8fa221e5d5f4eaca0f3ca5874c990d3 (patch) | |
tree | af7ed11bef82faa0e7a33b6ec8739a32ec50f00f /include/linux/moduleparam.h | |
parent | 05f408dddb013168759cdb4cbd0ba4e189a9504d (diff) | |
download | linux-d19f05d8a8fa221e5d5f4eaca0f3ca5874c990d3.tar.xz |
kernel/params.c: generalize bool_enable_only
This takes out the bool_enable_only implementation from
the module loading code and generalizes it so that others
can make use of it.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: cocci@systeme.lip6.fr
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r-- | include/linux/moduleparam.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 5d0f4d97997f..7e0079936396 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -427,6 +427,12 @@ extern int param_set_bool(const char *val, const struct kernel_param *kp); extern int param_get_bool(char *buffer, const struct kernel_param *kp); #define param_check_bool(name, p) __param_check(name, p, bool) +extern const struct kernel_param_ops param_ops_bool_enable_only; +extern int param_set_bool_enable_only(const char *val, + const struct kernel_param *kp); +/* getter is the same as for the regular bool */ +#define param_check_bool_enable_only param_check_bool + extern const struct kernel_param_ops param_ops_invbool; extern int param_set_invbool(const char *val, const struct kernel_param *kp); extern int param_get_invbool(char *buffer, const struct kernel_param *kp); |