Lines Matching refs:ctl_fd
76 static int ctl_fd = 0;
83 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
84 if (ctl_fd < 0 && errno == ENOENT) {
88 ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
92 if (ctl_fd < 0)
426 if (ioctl(ctl_fd, CTL_LUN_LIST, &list) == -1) {
475 if (ioctl(ctl_fd, CTL_PORT_LIST, &list) == -1) {
738 error = ioctl(ctl_fd, CTL_LUN_REQ, &req);
800 error = ioctl(ctl_fd, CTL_LUN_REQ, &req);
837 if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) {
906 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
930 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
988 error = ioctl(ctl_fd, CTL_PORT_REQ, &req);
1014 if (ioctl(ctl_fd, CTL_SET_PORT_WWNS, &entry) == -1)
1023 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1034 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1042 error = ioctl(ctl_fd, CTL_ENABLE_PORT, &entry);
1074 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1095 error = ioctl(ctl_fd, CTL_DISABLE_PORT, &entry);
1113 error = ioctl(ctl_fd, CTL_PORT_REQ, &req);
1134 error = ioctl(ctl_fd, CTL_LUN_MAP, &lm);
1158 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1)
1179 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1)
1206 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1234 if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) {
1259 error = cap_rights_limit(ctl_fd, &rights);
1263 error = cap_ioctls_limit(ctl_fd, cmds,