Lines Matching refs:ctl_fd
81 static int ctl_fd = 0; variable
88 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR); in kernel_init()
89 if (ctl_fd < 0 && errno == ENOENT) { in kernel_init()
93 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR); in kernel_init()
97 if (ctl_fd < 0) in kernel_init()
453 if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) { in conf_new_from_kernel()
502 if (ioctl(ctl_fd, CTL_PORT_LIST, &list) == -1) { in conf_new_from_kernel()
779 error = ioctl(ctl_fd, CTL_LUN_REQ, &req); in kernel_lun_add()
864 error = ioctl(ctl_fd, CTL_LUN_REQ, &req); in kernel_lun_modify()
903 if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) { in kernel_lun_remove()
975 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_handoff()
1002 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_limits()
1095 error = ioctl(ctl_fd, CTL_PORT_REQ, &req); in kernel_port_add()
1132 if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1) in kernel_port_add()
1141 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_add()
1152 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_add()
1160 error = ioctl(ctl_fd, CTL_ENABLE_PORT, &entry); in kernel_port_add()
1192 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_update()
1212 error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry); in kernel_port_remove()
1245 error = ioctl(ctl_fd, CTL_PORT_REQ, &req); in kernel_port_remove()
1268 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); in kernel_port_remove()
1292 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) in kernel_listen()
1313 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) in kernel_accept()
1340 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_send()
1371 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { in kernel_receive()
1395 if (caph_rights_limit(ctl_fd, &rights) < 0) in kernel_capsicate()
1398 if (caph_ioctls_limit(ctl_fd, cmds, nitems(cmds)) < 0) in kernel_capsicate()