aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/module.h
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1999-01-09 14:59:50 +0000
committerDoug Rabson <dfr@FreeBSD.org>1999-01-09 14:59:50 +0000
commita35261ef9153b9ee0fe42875fc01fd01b3759207 (patch)
tree9396dd75b3a0a0208bbfb7bfd738286e1d961d22 /sys/sys/module.h
parent380a989b3223d455375b4fae70fd0b9bdd43bafb (diff)
downloadsrc-a35261ef9153b9ee0fe42875fc01fd01b3759207.tar.gz
src-a35261ef9153b9ee0fe42875fc01fd01b3759207.zip
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.
Notes
Notes: svn path=/head/; revision=42435
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 7bcee0ef1636..efee3d127d38 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