diff options
Diffstat (limited to 'include/linux/moduleparam.h')
| -rw-r--r-- | include/linux/moduleparam.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index ddaae98c53f9..7939f636c8ba 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -31,6 +31,11 @@ static const char __module_cat(name,__LINE__)[] \ | |||
| 31 | #define __MODULE_PARM_TYPE(name, _type) \ | 31 | #define __MODULE_PARM_TYPE(name, _type) \ |
| 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
| 33 | 33 | ||
| 34 | /* One for each parameter, describing how to use it. Some files do | ||
| 35 | multiple of these per line, so can't just use MODULE_INFO. */ | ||
| 36 | #define MODULE_PARM_DESC(_parm, desc) \ | ||
| 37 | __MODULE_INFO(parm, _parm, #_parm ":" desc) | ||
| 38 | |||
| 34 | struct kernel_param; | 39 | struct kernel_param; |
| 35 | 40 | ||
| 36 | struct kernel_param_ops { | 41 | struct kernel_param_ops { |
| @@ -262,6 +267,26 @@ static inline void __kernel_param_unlock(void) | |||
| 262 | .str = &__param_string_##name, 0, perm); \ | 267 | .str = &__param_string_##name, 0, perm); \ |
| 263 | __MODULE_PARM_TYPE(name, "string") | 268 | __MODULE_PARM_TYPE(name, "string") |
| 264 | 269 | ||
| 270 | /** | ||
| 271 | * parameq - checks if two parameter names match | ||
| 272 | * @name1: parameter name 1 | ||
| 273 | * @name2: parameter name 2 | ||
| 274 | * | ||
| 275 | * Returns true if the two parameter names are equal. | ||
| 276 | * Dashes (-) are considered equal to underscores (_). | ||
| 277 | */ | ||
| 278 | extern bool parameq(const char *name1, const char *name2); | ||
| 279 | |||
| 280 | /** | ||
| 281 | * parameqn - checks if two parameter names match | ||
| 282 | * @name1: parameter name 1 | ||
| 283 | * @name2: parameter name 2 | ||
| 284 | * @n: the length to compare | ||
| 285 | * | ||
| 286 | * Similar to parameq(), except it compares @n characters. | ||
| 287 | */ | ||
| 288 | extern bool parameqn(const char *name1, const char *name2, size_t n); | ||
| 289 | |||
| 265 | /* Called on module insert or kernel boot */ | 290 | /* Called on module insert or kernel boot */ |
| 266 | extern int parse_args(const char *name, | 291 | extern int parse_args(const char *name, |
| 267 | char *args, | 292 | char *args, |
