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
This commit is contained in:
delphij 2010-10-21 20:31:50 +00:00
parent c8bc24032d
commit 0b25084d26

View File

@ -181,7 +181,9 @@ syscall_module_handler(struct module *mod, int what, void *arg)
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 */