X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Fmoduleparam.h;h=02477981d530788b491994a190241125fb9edf69;hb=352771d8dfacc828fdee58d5def490d5fb480c83;hp=7a145cd86c40ec2110dafee2aa62eb330f91efc4;hpb=8acd6bd4f7d04a05c364bea1883ca3876efde353;p=linux-2.6.git diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 7a145cd86..02477981d 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -129,16 +129,16 @@ extern int param_set_invbool(const char *val, struct kernel_param *kp); extern int param_get_invbool(char *buffer, struct kernel_param *kp); #define param_check_invbool(name, p) __param_check(name, p, int) -/* Comma-separated array: num is set to number they actually specified. */ -#define module_param_array_named(name, array, type, num, perm) \ +/* Comma-separated array: *nump is set to number they actually specified. */ +#define module_param_array_named(name, array, type, nump, perm) \ static struct kparam_array __param_arr_##name \ - = { ARRAY_SIZE(array), &num, param_set_##type, param_get_##type,\ + = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\ sizeof(array[0]), array }; \ module_param_call(name, param_array_set, param_array_get, \ &__param_arr_##name, perm) -#define module_param_array(name, type, num, perm) \ - module_param_array_named(name, name, type, num, perm) +#define module_param_array(name, type, nump, perm) \ + module_param_array_named(name, name, type, nump, perm) extern int param_array_set(const char *val, struct kernel_param *kp); extern int param_array_get(char *buffer, struct kernel_param *kp); @@ -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 */