|
|
| version 1.7, 2004/05/13 23:49:25 | version 1.8, 2004/05/19 22:53:01 |
|---|---|
| Line 763 static struct cdevsw crypto_cdevsw = { | Line 763 static struct cdevsw crypto_cdevsw = { |
| /* psize */ nopsize, | /* psize */ nopsize, |
| /* kqfilter */ NULL | /* kqfilter */ NULL |
| }; | }; |
| static dev_t crypto_dev; | |
| /* | /* |
| * Initialization code, both for static and dynamic loading. | * Initialization code, both for static and dynamic loading. |
| Line 775 cryptodev_modevent(module_t mod, int typ | Line 774 cryptodev_modevent(module_t mod, int typ |
| case MOD_LOAD: | case MOD_LOAD: |
| if (bootverbose) | if (bootverbose) |
| printf("crypto: <crypto device>\n"); | printf("crypto: <crypto device>\n"); |
| crypto_dev = make_dev(&crypto_cdevsw, 0, | cdevsw_add(&crypto_cdevsw, 0, 0); |
| UID_ROOT, GID_WHEEL, 0666, | make_dev(&crypto_cdevsw, 0, UID_ROOT, GID_WHEEL, |
| "crypto"); | 0666, "crypto"); |
| return 0; | return 0; |
| case MOD_UNLOAD: | case MOD_UNLOAD: |
| /*XXX disallow if active sessions */ | /*XXX disallow if active sessions */ |
| destroy_dev(crypto_dev); | cdevsw_remove(&crypto_cdevsw, 0, 0); |
| return 0; | return 0; |
| } | } |
| return EINVAL; | return EINVAL; |