summaryrefslogtreecommitdiff
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2004-08-22 22:26:41 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:26:41 -0700
commitf1577452f18e893e59bba53b3bda4fab17cc66c6 (patch)
treedaca7c36c0ab79b3dbe84de8c53934af83a2cffd /include/linux/moduleparam.h
parent4b4b699dc55425eb582fb233b7815ce0ecd97147 (diff)
[PATCH] fix reading string module parameters in sysfs
Reading the contents of a module_param_string through sysfs currently oopses because the param_get_charp() function cannot operate on a kparam_string struct. This introduces the required param_get_string. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 9e799ecc1b43..bdd36a8f9a4d 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -73,7 +73,7 @@ struct kparam_array
#define module_param_string(name, string, len, perm) \
static struct kparam_string __param_string_##name \
= { len, string }; \
- module_param_call(name, param_set_copystring, param_get_charp, \
+ module_param_call(name, param_set_copystring, param_get_string, \
&__param_string_##name, perm)
/* Called on module insert or kernel boot */
@@ -140,6 +140,7 @@ extern int param_array_set(const char *val, struct kernel_param *kp);
extern int param_array_get(char *buffer, struct kernel_param *kp);
extern int param_set_copystring(const char *val, struct kernel_param *kp);
+extern int param_get_string(char *buffer, struct kernel_param *kp);
int param_array(const char *name,
const char *val,