Re: Persistent module storage

Stephen Lee (sl14@crux1.cit.cornell.edu)
Tue, 5 Mar 1996 23:52:46 -0500


On Mar 5, 7:36pm, Bjorn Ekwall wrote:
>
> Hi all!
>
> Here is a kernel patch that makes it possible for modules to save
> status information between invocations.
>
> If you are using kerneld (and you _are_, aren't you? :-) ) a module can
> be loaded and unloaded at almost any time, with no memory of previous
> insmod/rmmod activities.
>
> This patch very useful when you want the module to do something the
> first time it gets loaded, but not on later "insmod's".
>
> There are two new kernel functions:
>
> char *get_persist(char *key);
> char *set_persist(char *key, char *value, int size);
>
> Each function looks for a "persistent" storage, named by "key",
> and returns a pointer to the value stored with the key, or NULL
> if there wasn't any value stored with the key.

Wouldn't "void *" and "size_t" be more appropriate than "char *" and "int"
for this purpose?

Stephen

-- 
Stephen Lee
Internet: sl14@cornell.edu