Messages in this thread | | | Date | Sun, 5 Sep 2010 14:20:20 -0700 | From | Randy Dunlap <> | Subject | Re: ldd scull_load question |
| |
On Sun, 05 Sep 2010 09:01:55 +0800 runcoderen wrote:
> yes, you do! > > there is another question confused me. > I have seem the command in the scull.c: > int scull_major = SCULL_MAJOR;and so on. > > module_param(scull_major, int, S_IRUGO); and so on. > > if we don't do "./scull_load scull_major" command. > > we just use "./scull_load" > > it will make scull_major = SCULL_MAJOR default?
Yes. scull_major is initialized to SCULL_MAJOR every time that the module is loaded. The module_param() allows someone to change the value of scull_major.
--- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***
| |