That's a nice one, and probably is doable.
The obvious implementation would print out the values passed initially
to the module as parameters. For things like sound drivers, I doubt
they update the configuration data whenever the mixer settings change.
There would also need to be a lock, so when drivers update this
information in their configuration blocks, the /proc interface doesn't
output inconsistent information.
How about a combination of this and Alan's __persistent suggestion?
/proc/module-params/sound outputs:
irq=8 volume=222 io=0x300 irq=5 dma=1,6
(etc. ignore those not set at insmod time,
except ones the driver explicitly marks
to be output after autodetect: io, irq, dma)
mixer=19980905fa90030405f4de345676 (... __persistent mixer block).
Where mixer is declared as:
__persistent(19980905, struct whatever, mixer) = {...};
Note, __persistent includes a version code and the name of the
parameter. This way, settings can be carried across kernel versions so
long as their meaning does not change. A single persistent binary block
wouldn't have this useful property.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html