diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2004-10-25 04:19:51 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-25 04:19:51 -0700 |
| commit | 1857599ace885dfb946dbdcc9a754be40a3b9c3c (patch) | |
| tree | 1499c4bc6658437b4a90eaf5b8759d7ed78a72e8 /include/linux/moduleparam.h | |
| parent | 48ed3c3b2d4ed657c54b1b17cd6cf1ff9c97dcd8 (diff) | |
[PATCH] Builtin Module Parameters in sysfs too
Currently, only module parameters in loaded modules are exported in
/sys/modules/, while those of "modules" built into the kernel can be set by
the kernel command line, but not read or set via sysfs.
- move module parameters from /sys/modules/$(module_name)/$(parameter_name) to
/sys/modules/$(module_name)/parameters/$(parameter_name)
- remove dummy kernel_param for exporting refcnt, add "struct module *"-based
attribute instead
- also export module paramters for "modules" which are built into the kernel,
so parameters are always accessible at
/sys/modules/$(KBUILD_MODNAME)/$(parameter_name)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
Signed-off-by: Dominik Brodowski <linux@brodo.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.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 4e6e7a51d74f..02477981d530 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -152,4 +152,15 @@ int param_array(const char *name, void *elem, int elemsize, int (*set)(const char *, struct kernel_param *kp), int *num); + +/* for exporting parameters in /sys/parameters */ + +struct module; + +extern int module_param_sysfs_setup(struct module *mod, + struct kernel_param *kparam, + unsigned int num_params); + +extern void module_param_sysfs_remove(struct module *mod); + #endif /* _LINUX_MODULE_PARAMS_H */ |
