Lines Matching refs:d_fd
73 int d_fd;
415 if (state->d_fd < 0)
442 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) == -1) {
477 state->d_fd = -1;
483 if ((state->d_fd = get_dev_crypto()) < 0)
490 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) {
491 put_dev_crypto(state->d_fd);
492 state->d_fd = -1;
508 if (state->d_fd < 0)
521 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) == -1) {
526 put_dev_crypto(state->d_fd);
527 state->d_fd = -1;
775 if ((state->d_fd = get_dev_crypto()) < 0) {
784 if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) {
785 put_dev_crypto(state->d_fd);
786 state->d_fd = -1;
801 if (!data || state->d_fd < 0) {
834 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
849 if (!md || state->d_fd < 0) {
863 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
885 if (state->d_fd < 0) {
896 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) < 0) {
902 put_dev_crypto(state->d_fd);
903 state->d_fd = -1;
928 dstate->d_fd = get_dev_crypto();
930 if (ioctl(dstate->d_fd, CIOCGSESSION, sess) < 0) {
931 put_dev_crypto(dstate->d_fd);
932 dstate->d_fd = -1;