Lines Matching refs:ctl_fd
83 static int ctl_fd = 0;
90 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
91 if (ctl_fd < 0 && errno == ENOENT) {
95 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
99 if (ctl_fd < 0)
455 if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) {
504 if (ioctl(ctl_fd, CTL_PORT_LIST, &list) == -1) {
752 error = ioctl(ctl_fd, CTL_LUN_REQ, &req);
835 error = ioctl(ctl_fd, CTL_LUN_REQ, &req);
873 if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) {
944 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
970 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1062 error = ioctl(ctl_fd, CTL_PORT_REQ, &req);
1098 if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1)
1107 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1118 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1126 error = ioctl(ctl_fd, CTL_ENABLE_PORT, &entry);
1158 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1178 error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry);
1210 error = ioctl(ctl_fd, CTL_PORT_REQ, &req);
1232 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1256 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1)
1277 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1)
1304 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1335 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1359 if (caph_rights_limit(ctl_fd, &rights) < 0)
1362 if (caph_ioctls_limit(ctl_fd, cmds, nitems(cmds)) < 0)