diff options
author | Andy Whitcroft <apw@canonical.com> | 2010-06-17 10:46:47 +0100 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2012-06-22 16:12:04 -0600 |
commit | 25f8e28457e05b80baea4cba9cbe275ddc47e2ac (patch) | |
tree | 72cc86bd917c54ae60710b91f0db13ea6deea8d4 /include | |
parent | 433fe501548ddf535f0b785dd182ba9ac20fe4b5 (diff) |
UBUNTU: SAUCE: add option to hand off all kernel parameters to init
BugLink: http://bugs.launchpad.net/bugs/586386
Some init packages such as upstart find having all of the kernel parameters
passed in useful. Currently they have to open up /proc/cmdline and
reparse that to obtain this information. Add a kernel configuration
option to enable passing of all options.
Note, enabling this option will reduce the chances that a fallback from
/sbin/init to /bin/bash or /bin/sh will succeed. Though it should be
noted that there are commonly unknown options present which would already
break this fallback. init=/bin/foo provides explicit control over options
which is unaffected by this change.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dynamic_debug.h | 10 | ||||
-rw-r--r-- | include/linux/moduleparam.h | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index c18257b0fa7..75949f6b6ab 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -45,7 +45,7 @@ extern __printf(2, 3) int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); extern int ddebug_dyndbg_module_param_cb(char *param, char *val, - const char *modname); + const char *modname, int all); struct device; @@ -106,7 +106,7 @@ static inline int ddebug_remove_module(const char *mod) } static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, - const char *modname) + const char *modname, int all) { if (strstr(param, "dyndbg")) { /* avoid pr_warn(), which wants pr_fmt() fully defined */ @@ -114,7 +114,11 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, "CONFIG_DYNAMIC_DEBUG builds\n"); return 0; /* allow and ignore */ } - return -EINVAL; + + if (!all) + return -EINVAL; + + return 0; } #define dynamic_pr_debug(fmt, ...) \ diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index d6a58065c09..827f76fdbd8 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -320,8 +320,8 @@ extern int parse_args(const char *name, unsigned num, s16 level_min, s16 level_max, - int (*unknown)(char *param, char *val, - const char *doing)); + int (*handle_arg)(char *param, char *val, + const char *doing, int known)); /* Called by module remove. */ #ifdef CONFIG_SYSFS |