[8269] in linux-scsi channel archive
Re: Driver reading from a file
daemon@ATHENA.MIT.EDU (Marc SCHAEFER)
Tue Feb 29 11:10:23 2000
To: linux-scsi@vger.rutgers.edu
From: Marc SCHAEFER <schaefer@alphanet.ch>
Date: 29 Feb 2000 17:00:36 +0100
Message-ID: <89gqf4$shd$1@vulcan.alphanet.ch>
WANG,YIDING (HP-SanJose,ex1) <yiding_wang@agilent.com> wrote:
> I was wondering that any utility under Linux can allow drvier to read some
> variable form a file during dirver initialization stage? If there is, what
> is the utility can be used in the driver initialization stage to talk with a
> user or driver configuration or system configuration file?
No, however you can define module variables which will be passed to the driver.
Example (for 2.2.x):
/* Module parameters */
int unacceptable_mask = 0; /* You can use this to bypass detection
* of the boards. E.g. setting to 4
* will skip the 3rd board.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
MODULE_PARM(unacceptable_mask, "i");
#endif /* >= 2.2.0 */
Use:
insmod driver.o unacceptable_mask=1
Used in conjunction with on-demand loading (/etc/conf.modules) or with
startup scripts, you get mostly similar functionnality.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu