diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-07-09 14:13:56 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-07-09 14:13:56 +0100 |
commit | c2a2f409564ec042c0c982b2de469d65c41a8037 (patch) | |
tree | f1a159a429f4b8c2e3cb7cdf62e37feb1dcfdeee /xen/include/xen/init.h | |
parent | 6df628045b5dd29ca52334e683d93b38b52e3dc4 (diff) | |
download | xen-c2a2f409564ec042c0c982b2de469d65c41a8037.tar.gz xen-c2a2f409564ec042c0c982b2de469d65c41a8037.tar.bz2 xen-c2a2f409564ec042c0c982b2de469d65c41a8037.zip |
Allow inversion of boolean cmdline parameters with 'no-' prefix.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/init.h')
-rw-r--r-- | xen/include/xen/init.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h index 3ff3ff0e37..f5afd0cfa1 100644 --- a/xen/include/xen/init.h +++ b/xen/include/xen/init.h @@ -78,7 +78,7 @@ extern initcall_t __initcall_start, __initcall_end; */ struct kernel_param { const char *name; - enum { OPT_STR, OPT_UINT, OPT_BOOL, OPT_CUSTOM } type; + enum { OPT_STR, OPT_UINT, OPT_BOOL, OPT_INVBOOL, OPT_CUSTOM } type; void *var; unsigned int len; }; @@ -93,6 +93,10 @@ extern struct kernel_param __setup_start, __setup_end; static char __setup_str_##_var[] __initdata = _name; \ static struct kernel_param __setup_##_var __attribute_used__ \ __initsetup = { __setup_str_##_var, OPT_BOOL, &_var, sizeof(_var) } +#define invboolean_param(_name, _var) \ + static char __setup_str_##_var[] __initdata = _name; \ + static struct kernel_param __setup_##_var __attribute_used__ \ + __initsetup = { __setup_str_##_var, OPT_INVBOOL, &_var, sizeof(_var) } #define integer_param(_name, _var) \ static char __setup_str_##_var[] __initdata = _name; \ static struct kernel_param __setup_##_var __attribute_used__ \ |