lkml.org 
[lkml]   [1998]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Module Ideas: Persistence, PnP, and more...
On Sat, Sep 05, 1998 at 11:06:38AM +0300, Alon Ziv wrote:
> I, personally, prefer a /proc interface that will print, for each settable
> parameter, its contents in the same format used on insertion (e.g.,
> `cat /proc/module-params/sound' will result in `irq=8 volume=222').

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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.030 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site