Results 1 to 3 of 3
Hello Friends
I'm using RH9 2.4 kernel and i've problem with module_param() function in the module.
i've declared one global variable say
static int x =1;
/*and the rest of ...
- 09-18-2005 #1Just Joined!
- Join Date
- Sep 2005
- Posts
- 1
proble with MODULE_PARM()
Hello Friends
I'm using RH9 2.4 kernel and i've problem with module_param() function in the module.
i've declared one global variable say
static int x =1;
/*and the rest of the functions in the module*/
..........
.........
MODULE_PARM(x,"i");
.......
........
/*finish the code*/
but it is showing error in compiling like
"parse error before string constant "
warning : type defaults to 'int' in the declaration of module param
warning : data definition has no type or storage class
i've also tried
module_param(x, int);
but getting the same, "parse error before "int" "
please somebody get me out of this
Thanks in Advance,
Pratik H Pandya.
- 09-18-2005 #2
You are missing a vital argument to module_param(), which is the permissions mask for the sysfs entry:
for example.Code:static int x = 1; module_param(x, int, S_IRUGO);
- 09-19-2005 #3Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
Does a 2.4 kernel have sysfs???
Originally Posted by lakerdonald
I doubt...
AFAIK, sysfs is introduced in 2.6
Also, AFAIK, RH9 uses version 2.4.18...
The source of 2.4.18 doesn't define module_param() at all...
Take a look at:
http://lxr.linux.no/ident?v=2.4.18&i=module_paramThe Unforgiven
Registered Linux User #358564


Reply With Quote
