aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLuis R. Rodriguez <[email protected]>2015-05-27 11:09:38 +0930
committerRusty Russell <[email protected]>2015-05-28 11:32:11 +0930
commitd19f05d8a8fa221e5d5f4eaca0f3ca5874c990d3 (patch)
treeaf7ed11bef82faa0e7a33b6ec8739a32ec50f00f /include
parent05f408dddb013168759cdb4cbd0ba4e189a9504d (diff)
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 <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Kees Cook <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/linux/moduleparam.h6
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);