Re: ldd scull_load question

From: Randy Dunlap
Date: Sun Sep 05 2010 - 17:20:33 EST


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 ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/