https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192250
Bug ID: 192250
Summary: module(9) and its corresponding manpages don't
document that evhand (the load/unload/etc handler) can
be NULL
Product: Documentation
Version: Latest
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Some People
Priority: ---
Component: Documentation
Assignee: [email protected]
Reporter: [email protected]
The structure for a kernel module is like so:
52 /*
53 * Struct for registering modules statically via SYSINIT.
54 */
55 typedef struct moduledata {
56 const char *name; /* module name */
57 modeventhand_t evhand; /* event handler */
58 void *priv; /* extra data */
59 } moduledata_t;
The documentation doesn't note that evhand can be NULL though (and if it's NULL
then modevent_nop will be used in lieu of evhand):
$ grep -r evhand /sys/kern/
/sys/kern/kern_module.c: " %d\n", data->name, (void
*)data->evhand, data->priv,
/sys/kern/kern_module.c: newmod->handler = data->evhand ? data->evhand :
modevent_nop;
$
I looked at the examples in /usr/share/examples/kld and they didn't provide an
example that did this either.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "[email protected]"