Commit 23024c83 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

MODULE: add byte type of module paramater, like the comments say we support...

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 9c574c5a
......@@ -89,6 +89,10 @@ extern int parse_args(const char *name,
#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)
......
......@@ -171,6 +171,7 @@ int parse_args(const char *name,
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 @@ int param_set_copystring(const char *val, struct kernel_param *kp)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment