X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fmoduleparam.h;h=7939f636c8bae3c747b604c98472d34de620ab70;hb=b2d5074d5d465930612c26de2ecabaf50024583d;hp=ddaae98c53f9191ec2314efa46c904912b1781ff;hpb=219f358e0ba9a98640341e030533089860af1cc6;p=pandora-kernel.git 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__)[] \ #define __MODULE_PARM_TYPE(name, _type) \ __MODULE_INFO(parmtype, name##type, #name ":" _type) +/* One for each parameter, describing how to use it. Some files do + multiple of these per line, so can't just use MODULE_INFO. */ +#define MODULE_PARM_DESC(_parm, desc) \ + __MODULE_INFO(parm, _parm, #_parm ":" desc) + struct kernel_param; struct kernel_param_ops { @@ -262,6 +267,26 @@ static inline void __kernel_param_unlock(void) .str = &__param_string_##name, 0, perm); \ __MODULE_PARM_TYPE(name, "string") +/** + * parameq - checks if two parameter names match + * @name1: parameter name 1 + * @name2: parameter name 2 + * + * Returns true if the two parameter names are equal. + * Dashes (-) are considered equal to underscores (_). + */ +extern bool parameq(const char *name1, const char *name2); + +/** + * parameqn - checks if two parameter names match + * @name1: parameter name 1 + * @name2: parameter name 2 + * @n: the length to compare + * + * Similar to parameq(), except it compares @n characters. + */ +extern bool parameqn(const char *name1, const char *name2, size_t n); + /* Called on module insert or kernel boot */ extern int parse_args(const char *name, char *args,