Lines Matching refs:ctl_fd
82 static int ctl_fd = 0; variable
89 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR); in kernel_init()
90 if (ctl_fd < 0 && errno == ENOENT) { in kernel_init()
94 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR); in kernel_init()
98 if (ctl_fd < 0) in kernel_init()
440 if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) { in conf_new_from_kernel()
489 if (ioctl(ctl_fd, CTL_PORT_LIST, &list) == -1) { in conf_new_from_kernel()
737 error = ioctl(ctl_fd, CTL_LUN_REQ, &req); in kernel_lun_add()
796 error = ioctl(ctl_fd, CTL_LUN_REQ, &req); in kernel_lun_modify()
834 if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) { in kernel_lun_remove()
905 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_handoff()
931 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_limits()
1023 error = ioctl(ctl_fd, CTL_PORT_REQ, &req); in kernel_port_add()
1059 if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1) in kernel_port_add()
1068 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_add()
1079 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_add()
1087 error = ioctl(ctl_fd, CTL_ENABLE_PORT, &entry); in kernel_port_add()
1119 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_update()
1139 error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry); in kernel_port_remove()
1171 error = ioctl(ctl_fd, CTL_PORT_REQ, &req); in kernel_port_remove()
1193 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_remove()
1217 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) in kernel_listen()
1238 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) in kernel_accept()
1265 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_send()
1296 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_receive()
1321 error = cap_rights_limit(ctl_fd, &rights); in kernel_capsicate()
1325 error = cap_ioctls_limit(ctl_fd, cmds, nitems(cmds)); in kernel_capsicate()