MCPcopy Create free account
hub / github.com/F-Stack/f-stack / crypto_modevent

Function crypto_modevent

freebsd/opencrypto/crypto.c:2264–2282  ·  view source on GitHub ↗

* Initialization code, both for static and dynamic loading. * Note this is not invoked with the usual MODULE_DECLARE * mechanism but instead is listed as a dependency by the * cryptosoft driver. This guarantees proper ordering of * calls on module load/unload. */

Source from the content-addressed store, hash-verified

2262 * calls on module load/unload.
2263 */
2264int
2265crypto_modevent(module_t mod, int type, void *unused)
2266{
2267 int error = EINVAL;
2268
2269 switch (type) {
2270 case MOD_LOAD:
2271 error = crypto_init();
2272 if (error == 0 && bootverbose)
2273 printf("crypto: <crypto core>\n");
2274 break;
2275 case MOD_UNLOAD:
2276 /*XXX disallow if active sessions */
2277 error = 0;
2278 crypto_destroy();
2279 return 0;
2280 }
2281 return error;
2282}
2283MODULE_VERSION(crypto, 1);
2284MODULE_DEPEND(crypto, zlib, 1, 1, 1);

Callers

nothing calls this directly

Calls 3

crypto_initFunction · 0.85
crypto_destroyFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected