| 1361 | } |
| 1362 | |
| 1363 | static int |
| 1364 | crypto_open(struct cdev *dev, int oflags, int devtype, struct thread *td) |
| 1365 | { |
| 1366 | struct fcrypt *fcr; |
| 1367 | int error; |
| 1368 | |
| 1369 | fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK | M_ZERO); |
| 1370 | TAILQ_INIT(&fcr->csessions); |
| 1371 | mtx_init(&fcr->lock, "fcrypt", NULL, MTX_DEF); |
| 1372 | error = devfs_set_cdevpriv(fcr, fcrypt_dtor); |
| 1373 | if (error) |
| 1374 | fcrypt_dtor(fcr); |
| 1375 | return (error); |
| 1376 | } |
| 1377 | |
| 1378 | static int |
| 1379 | crypto_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, |
nothing calls this directly
no test coverage detected