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

Function crypto_open

freebsd/opencrypto/cryptodev.c:1363–1376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1361}
1362
1363static int
1364crypto_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
1378static int
1379crypto_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,

Callers

nothing calls this directly

Calls 3

mallocFunction · 0.85
mtx_initFunction · 0.85
fcrypt_dtorFunction · 0.85

Tested by

no test coverage detected