diff options
author | Hannes Reinecke <hare@suse.de> | 2014-06-25 09:27:37 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:07:37 -0400 |
commit | b4210b810e5040f10a30ba56de6c3faab5c49345 (patch) | |
tree | eb7970e092cb7795bd935d0aff10c8dda1da833f | |
parent | 9cb78c16f5dadefd8dc5ba0ae5a2f26cd59419b3 (diff) |
Add module param type 'ullong'
Some driver might want to pass in an 64-bit value, so introduce
a module param type 'ullong'.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | include/linux/moduleparam.h | 5 | ||||
-rw-r--r-- | kernel/params.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index b1990c5524e1..494f99e852da 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -381,6 +381,11 @@ extern int param_set_ulong(const char *val, const struct kernel_param *kp); | |||
381 | extern int param_get_ulong(char *buffer, const struct kernel_param *kp); | 381 | extern int param_get_ulong(char *buffer, const struct kernel_param *kp); |
382 | #define param_check_ulong(name, p) __param_check(name, p, unsigned long) | 382 | #define param_check_ulong(name, p) __param_check(name, p, unsigned long) |
383 | 383 | ||
384 | extern struct kernel_param_ops param_ops_ullong; | ||
385 | extern int param_set_ullong(const char *val, const struct kernel_param *kp); | ||
386 | extern int param_get_ullong(char *buffer, const struct kernel_param *kp); | ||
387 | #define param_check_ullong(name, p) __param_check(name, p, unsigned long long) | ||
388 | |||
384 | extern struct kernel_param_ops param_ops_charp; | 389 | extern struct kernel_param_ops param_ops_charp; |
385 | extern int param_set_charp(const char *val, const struct kernel_param *kp); | 390 | extern int param_set_charp(const char *val, const struct kernel_param *kp); |
386 | extern int param_get_charp(char *buffer, const struct kernel_param *kp); | 391 | extern int param_get_charp(char *buffer, const struct kernel_param *kp); |
diff --git a/kernel/params.c b/kernel/params.c index 1e52ca233fd9..34f527023794 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -256,6 +256,7 @@ STANDARD_PARAM_DEF(int, int, "%i", kstrtoint); | |||
256 | STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint); | 256 | STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint); |
257 | STANDARD_PARAM_DEF(long, long, "%li", kstrtol); | 257 | STANDARD_PARAM_DEF(long, long, "%li", kstrtol); |
258 | STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul); | 258 | STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul); |
259 | STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu", kstrtoull); | ||
259 | 260 | ||
260 | int param_set_charp(const char *val, const struct kernel_param *kp) | 261 | int param_set_charp(const char *val, const struct kernel_param *kp) |
261 | { | 262 | { |