summaryrefslogtreecommitdiffstats
path: root/sys/sys/module.h
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1999-01-09 14:59:50 +0000
committerdfr <dfr@FreeBSD.org>1999-01-09 14:59:50 +0000
commit24b62c894f6eedf71185e326e377b40bfe3aa113 (patch)
tree24f9f2d63d987cb22020a57c75538f5252f97d26 /sys/sys/module.h
parent1c2ce69de1c6327a976692e04b95597ef93d83e6 (diff)
downloadFreeBSD-src-24b62c894f6eedf71185e326e377b40bfe3aa113.zip
FreeBSD-src-24b62c894f6eedf71185e326e377b40bfe3aa113.tar.gz
Implement a mechanism for a module to report a small amount of module
specific data back to the user via kldstat(2). Use that mechanism in the syscall handler to report the syscall number used.
Diffstat (limited to 'sys/sys/module.h')
-rw-r--r--sys/sys/module.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/sys/module.h b/sys/sys/module.h
index 7bcee0e..efee3d1 100644
--- a/sys/sys/module.h
+++ b/sys/sys/module.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: module.h,v 1.4 1998/10/09 23:05:45 peter Exp $
+ * $Id: module.h,v 1.5 1998/11/14 21:58:41 wollman Exp $
*/
#ifndef _SYS_MODULE_H_
@@ -50,6 +50,17 @@ typedef struct moduledata {
void *_file; /* private; used by linker */
} moduledata_t;
+/*
+ * A module can use this to report module specific data to
+ * the user via kldstat(2).
+ */
+typedef union modspecific {
+ int intval;
+ u_int uintval;
+ long longval;
+ u_long ulongval;
+} modspecific_t;
+
#ifdef KERNEL
#define DECLARE_MODULE(name, data, sub, order) \
@@ -66,6 +77,7 @@ void module_release(module_t mod);
int module_unload(module_t mod);
int module_getid(module_t mod);
module_t module_getfnext(module_t mod);
+void module_setspecific(module_t mod, modspecific_t *datap);
#ifdef MOD_DEBUG
@@ -92,6 +104,7 @@ struct module_stat {
char name[MAXMODNAME];
int refs;
int id;
+ modspecific_t data;
};
#ifndef KERNEL
OpenPOWER on IntegriCloud