[an error occurred while processing this directive]
|
The MODULE_PARM() macro takes 2 arguments: the name of the variable and its type. The supported variable types are "b": single byte, "h": short int, "i": integer, "l": long int and "s": string. Strings should be declared as "char *" and insmod will allocate memory for them. You should always try to give the variables an initial default value. This is kernel code, and you should program defensively. For example:
int myint = 3;
char *mystr;
MODULE_PARM (myint, "i");
MODULE_PARM (mystr, "s");
Туплю, напр набираем insmod drv_name -p0x300 -i5 -v2
Как insmod узнает, какую var чем инициализировать?
Спасибо.
E-mail: info@telesys.ru