00001 #include <linux/moduleparam.h>
00002 #include <linux/kernel.h>
00003 #include <linux/string.h>
00004 #include <linux/errno.h>
00005 #include <linux/module.h>
00006 #include <linux/device.h>
00007 #include <linux/err.h>
00008 #include <linux/slab.h>
00009
00010
00011 #define STANDARD_PARAM_DEF(name, type, format, tmptype, strtolfn) \
00012 int param_set_##name(const char *val, struct kernel_param *kp) \
00013 { \
00014 return 0; \
00015 } \
00016 int param_get_##name(char *buffer, struct kernel_param *kp) \
00017 { \
00018 return 0;\
00019 }
00020
00021 STANDARD_PARAM_DEF(byte, unsigned char, "%c", unsigned long, simple_strtoul);
00022 STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol);
00023 STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, simple_strtoul);
00024 STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol);
00025 STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, simple_strtoul);
00026 STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol);
00027 STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul);
00028
00029 int printk_ratelimit(void)
00030 {
00031 return 0;
00032 }