lkml.org 
[lkml]   [1996]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Persistent module storage
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


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