FreeBSD/sys/opencrypto/cryptodev.c
/*
 * Initialization code, both for static and dynamic loading.
 */
Initialization code, both for static and dynamic loading.
Initialization code both for static and dynamic loading .
static int
cryptodev_modevent(module_t mod, int type, void *unused)
{
	switch (type) {
	case MOD_LOAD:
		if (bootverbose)
			printf("crypto: <crypto device>\n");
		crypto_dev = make_dev(&crypto_cdevsw, 0, 
				      UID_ROOT, GID_WHEEL, 0666,
				      "crypto");
		return 0;
	case MOD_UNLOAD:
		destroy_dev(crypto_dev);
		return 0;
	}
	return EINVAL;
}
static int cryptodev_modevent ( module_t mod , int type , void * unused ) { switch ( type ) { case MOD_LOAD : if ( bootverbose ) printf ( " \n " ) ; crypto_dev = make_dev ( & crypto_cdevsw , 0 , UID_ROOT , GID_WHEEL , 0666 , " " ) ; return 0 ; case MOD_UNLOAD : destroy_dev ( crypto_dev ) ; return 0 ; } return EINVAL ; }
Initialization code, both for static and dynamic loading.
Initialization code both for static and dynamic loading .
/*XXX disallow if active sessions */