diff options
author | phk <phk@FreeBSD.org> | 2004-07-13 19:36:59 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-07-13 19:36:59 +0000 |
commit | b0e68741889ab66096103a2dec2219bbde3c21c6 (patch) | |
tree | d2eb15e6477b3d5e7e1f7c49c1e2eed3b85ec318 /sys/sys/module.h | |
parent | 7b891087ed78b2c7943c2503f0bfdd7678a6d65c (diff) | |
download | FreeBSD-src-b0e68741889ab66096103a2dec2219bbde3c21c6.zip FreeBSD-src-b0e68741889ab66096103a2dec2219bbde3c21c6.tar.gz |
Give kldunload a -f(orce) argument.
Add a MOD_QUIESCE event for modules. This should return error (EBUSY)
of the module is in use.
MOD_UNLOAD should now only fail if it is impossible (as opposed to
inconvenient) to unload the module. Valid reasons are memory references
into the module which cannot be tracked down and eliminated.
When kldunloading, we abandon if MOD_UNLOAD fails, and if -force is
not given, MOD_QUIESCE failing will also prevent the unload.
For backwards compatibility, we treat EOPNOTSUPP from MOD_QUIESCE as
success.
Document that modules should return EOPNOTSUPP for unknown events.
Diffstat (limited to 'sys/sys/module.h')
-rw-r--r-- | sys/sys/module.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sys/module.h b/sys/sys/module.h index 39f138d..5beb9bb 100644 --- a/sys/sys/module.h +++ b/sys/sys/module.h @@ -42,7 +42,8 @@ typedef enum modeventtype { MOD_LOAD, MOD_UNLOAD, - MOD_SHUTDOWN + MOD_SHUTDOWN, + MOD_QUIESCE } modeventtype_t; typedef struct module *module_t; @@ -142,7 +143,7 @@ module_t module_lookupbyname(const char *); module_t module_lookupbyid(int); void module_reference(module_t); void module_release(module_t); -int module_unload(module_t); +int module_unload(module_t, int flags); int module_getid(module_t); module_t module_getfnext(module_t); void module_setspecific(module_t, modspecific_t *); |