Lines Matching refs:ctl_fd
78 static int ctl_fd = 0;
85 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
86 if (ctl_fd < 0 && errno == ENOENT) {
90 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
94 if (ctl_fd < 0)
436 if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) {
485 if (ioctl(ctl_fd, CTL_PORT_LIST, &list) == -1) {
748 error = ioctl(ctl_fd, CTL_LUN_REQ, &req);
810 error = ioctl(ctl_fd, CTL_LUN_REQ, &req);
847 if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) {
916 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
940 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
998 error = ioctl(ctl_fd, CTL_PORT_REQ, &req);
1024 if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1)
1033 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1044 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1052 error = ioctl(ctl_fd, CTL_ENABLE_PORT, &entry);
1084 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1105 error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry);
1123 error = ioctl(ctl_fd, CTL_PORT_REQ, &req);
1144 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1168 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1)
1189 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1)
1216 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1244 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1269 error = cap_rights_limit(ctl_fd, &rights);
1273 error = cap_ioctls_limit(ctl_fd, cmds, nitems(cmds));