Lines Matching refs:cfd

53 static int cfd = -1;  variable
88 if (ioctl(cfd, CIOCFSESSION, &sess->ses) < 0) { in clean_devcrypto_session()
229 ret = ioctl(cfd, CIOCGSESSION2, &cipher_ctx->sess); in cipher_init()
231 ret = ioctl(cfd, CIOCGSESSION, &cipher_ctx->sess); in cipher_init()
285 if (ioctl(cfd, CIOCCRYPT, &cryp) < 0) { in cipher_do_cipher()
459 if (ioctl(cfd, CIOCGSESSION2, &sess) == 0) { in prepare_cipher_methods()
463 if (ioctl(cfd, CIOCGSESSION2, &sess) < 0) { in prepare_cipher_methods()
470 if (ioctl(cfd, CIOCGSESSION, &sess) < 0) { in prepare_cipher_methods()
508 if (ioctl(cfd, CIOCFINDDEV, &fop) == 0) { in prepare_cipher_methods()
514 if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0) { in prepare_cipher_methods()
527 ioctl(cfd, CIOCFSESSION, &sess.ses); in prepare_cipher_methods()
758 if (ioctl(cfd, CIOCGSESSION, &digest_ctx->sess) < 0) { in digest_init()
777 return ioctl(cfd, CIOCCRYPT, &cryp); in digest_op()
838 if (ioctl(cfd, CIOCCPHASH, &cphash) < 0) { in digest_copy()
916 if (ioctl(cfd, CIOCGSESSION, &sess1) < 0) { in prepare_digest_methods()
924 if (ioctl(cfd, CIOCGSESSINFO, &siop) < 0) { in prepare_digest_methods()
939 if (ioctl(cfd, CIOCGSESSION, &sess2) < 0) { in prepare_digest_methods()
945 if (ioctl(cfd, CIOCCPHASH, &cphash) < 0) { in prepare_digest_methods()
969 ioctl(cfd, CIOCFSESSION, &sess1.ses); in prepare_digest_methods()
971 ioctl(cfd, CIOCFSESSION, &sess2.ses); in prepare_digest_methods()
1226 if (cfd >= 0) in open_devcrypto()
1238 if (ioctl(fd, CRIOGET, &cfd) < 0) { in open_devcrypto()
1241 cfd = -1; in open_devcrypto()
1246 cfd = fd; in open_devcrypto()
1256 if (cfd < 0) in close_devcrypto()
1258 ret = close(cfd); in close_devcrypto()
1259 cfd = -1; in close_devcrypto()