Re: Checking module parameters

From: Stefan Richter
Date: Mon Jan 19 2009 - 08:07:37 EST

Nick Craig-Wood wrote:
> On Mon, Jan 19, 2009 at 11:19:34AM +0100, Stefan Richter wrote:
>> There is also /sys/module/*/parameters/* which can be read and in some
>> cases even be written.
> It doesn't appear to show the force parameter.

You are right.
>From drivers/ata/libata-core.c:

|> static char ata_force_param_buf[PAGE_SIZE] __initdata;
|> /* param_buf is thrown away after initialization, disallow read */
|> module_param_string(force, ata_force_param_buf,
sizeof(ata_force_param_buf), 0);
|> MODULE_PARM_DESC(force, "Force ATA configurations including cable
type, link speed and transfer mode (see
Documentation/kernel-parameters.txt for details)");

The 0 in module_param_string are the sysfs file permissions of libata.force.

And __initdata means that the memory goes away after ata_init() returned.
Stefan Richter
-=====-==--= ---= =--==
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at