Author: delphij
Date: Thu Oct 21 20:31:50 2010
New Revision: 214181
URL: http://svn.freebsd.org/changeset/base/214181
Log:
Call chainevh callback when we are invoked with neither MOD_LOAD nor
MOD_UNLOAD. This makes it possible to add custom hooks for other module
events.
Return EOPNOTSUPP when there is no callback available.
Pointed out by: jhb
Reviewed by: jhb
MFC after: 1 month
Modified:
head/sys/kern/kern_syscalls.c
Modified: head/sys/kern/kern_syscalls.c
==============================================================================
--- head/sys/kern/kern_syscalls.c Thu Oct 21 20:30:35 2010
(r214180)
+++ head/sys/kern/kern_syscalls.c Thu Oct 21 20:31:50 2010
(r214181)
@@ -181,7 +181,9 @@ syscall_module_handler(struct module *mo
error = syscall_deregister(data->offset, &data->old_sysent);
return (error);
default:
- return EOPNOTSUPP;
+ if (data->chainevh)
+ return (data->chainevh(mod, what, data->chainarg));
+ return (EOPNOTSUPP);
}
/* NOTREACHED */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"