Module parameter question in 2.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a 2.4 module which has a module parameter
defined as follows:

#define MAX_NAME 10
static char* nameArray[MAX_NAME] ;
MODULE_PARM(nameArray,"1-10s");

My understanding, in 2.4, when the module is inserted,
the user has to specify atleast 1, but cannot specify
more than MAX_NAME elements of the array.

For 2.6, I would have to modify the MODULE_PARM line
as follows:

module_param_array(nameArray, charp, MAX_NAME, 0);

My understanding, when the module is inserted, the
user cannot specify more than MAX_NAME elements. 
However, where is it,(or how can I) enforce that the
user has to specify atleast one element (same as in
2.4).

Thank you,
A.



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux