ChangeSet 1.1807.59.2, 2004/08/05 13:10:16-07:00, greg@kroah.com MODULE: add byte type of module paramater, like the comments say we support... Signed-off-by: Greg Kroah-Hartman include/linux/moduleparam.h | 4 ++++ kernel/params.c | 3 +++ 2 files changed, 7 insertions(+) diff -Nru a/include/linux/moduleparam.h b/include/linux/moduleparam.h --- a/include/linux/moduleparam.h 2004-08-23 11:05:38 -07:00 +++ b/include/linux/moduleparam.h 2004-08-23 11:05:38 -07:00 @@ -89,6 +89,10 @@ #define __param_check(name, p, type) \ static inline type *__check_##name(void) { return(p); } +extern int param_set_byte(const char *val, struct kernel_param *kp); +extern int param_get_byte(char *buffer, struct kernel_param *kp); +#define param_check_byte(name, p) __param_check(name, p, unsigned char) + extern int param_set_short(const char *val, struct kernel_param *kp); extern int param_get_short(char *buffer, struct kernel_param *kp); #define param_check_short(name, p) __param_check(name, p, short) diff -Nru a/kernel/params.c b/kernel/params.c --- a/kernel/params.c 2004-08-23 11:05:38 -07:00 +++ b/kernel/params.c 2004-08-23 11:05:38 -07:00 @@ -171,6 +171,7 @@ return sprintf(buffer, format, *((type *)kp->arg)); \ } +STANDARD_PARAM_DEF(byte, unsigned char, "%c", unsigned long, simple_strtoul); STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol); STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, simple_strtoul); STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol); @@ -339,6 +340,8 @@ return 0; } +EXPORT_SYMBOL(param_set_byte); +EXPORT_SYMBOL(param_get_byte); EXPORT_SYMBOL(param_set_short); EXPORT_SYMBOL(param_get_short); EXPORT_SYMBOL(param_set_ushort);