Lines Matching defs:fd

878 	int	fd, i;
909 if ((fd = g_object_open(drvr_path, O_NDELAY | O_RDONLY)) == -1)
912 if (ioctl(fd, FCIO_GETMAP, map_ptr) != 0) {
914 (void) close(fd);
917 (void) close(fd);
951 int fd;
968 if ((fd = g_object_open(host_path, O_NDELAY | O_RDONLY)) == -1) {
980 if (g_issue_fcio_ioctl(fd, &fcio, verbose) != 0) {
982 (void) close(fd);
985 (void) close(fd);
1012 g_issue_fcio_ioctl(int fd, fcio_t *fcio, int verbose)
1017 if (ioctl(fd, FCIO_CMD, fcio) != 0) {
1065 g_issue_fcp_ioctl(int fd, struct fcp_ioctl *fcp_data, int verbose)
1077 if (ioctl(fd, FCP_TGT_INQUIRY, fcp_data) == -1) {
1131 int fd;
1173 if ((fd = g_object_open(fcapath, O_NDELAY | O_RDONLY)) == -1) {
1184 if (g_issue_fcio_ioctl(fd, &fcio, 0) != 0) {
1186 (void) close(fd);
1191 (void) close(fd);
1197 (void) close(fd);
1210 if ((err = g_issue_fcio_ioctl(fd, &fcio, 0)) != 0) {
1221 (void) close(fd);
1232 if ((err = g_issue_fcio_ioctl(fd, &fcio, 0)) != 0) {
1248 (void) close(fd);
1254 (void) close(fd);
1267 (void) close(fd);
1276 (void) close(fd);
1285 (void) close(fd);
1342 int dev_type, fd;
1379 if ((fd = g_object_open(fcapath, O_NDELAY | O_RDONLY)) == -1)
1382 if (fstat(fd, &sbuf) == -1) {
1383 (void) close(fd);
1388 (void) close(fd);
1400 close(fd);
1406 close(fd);
1430 int dev_type, fd;
1441 if ((fd = g_object_open(fcapath, O_NDELAY | O_RDONLY)) == -1) {
1445 if (fstat(fd, &sbuf) == -1) {
1446 (void) close(fd);
1451 (void) close(fd);
1463 close(fd);
1469 close(fd);
1541 int fd, i, j, num_devices = 0, err, pathcnt = 1;
1849 if ((fd = g_object_open(drvr_path, O_NDELAY | O_RDONLY)) == -1)
1853 if (ioctl(fd, SFIOCGMAP, &sf_map) != 0) {
1855 (void) close(fd);
1860 (void) close(fd);
1864 (void) close(fd);
1872 (void) close(fd);
1880 (void) close(fd);
1890 (void) close(fd);
2153 int fd, i, num_devices = 0, err, pathcnt = 1, new_count = 0;
2266 if ((fd = g_object_open(drvr_path, O_NDELAY | O_RDONLY)) == -1) {
2278 if (g_issue_fcio_ioctl(fd, &fcio, 0) != 0) {
2280 (void) close(fd);
2287 (void) close(fd);
2302 if ((err = g_issue_fcio_ioctl(fd, &fcio, 0)) != 0) {
2314 (void) close(fd);
2327 if ((err = g_issue_fcio_ioctl(fd, &fcio,
2344 (void) close(fd);
2355 (void) close(fd);
2379 (void) close(fd);
2393 if (g_issue_fcio_ioctl(fd, &fcio, 0) != 0) {
2395 (void) close(fd);
2402 (void) close(fd);
2419 (void) close(fd);
2437 (void) close(fd);
2456 (void) close(fd);
2469 (void) close(fd);
2476 if (fstat(fd, &sbuf) == -1) {
2478 (void) close(fd);
2486 (void) close(fd);
2500 (void) close(fd);
2512 (void) close(fd);
2539 if (g_issue_fcio_ioctl(fd, &fcio, 0) != 0) {
2547 (void) close(fd);
2554 (void) close(fd);
2555 if ((fd = g_object_open(drvr_path,
2573 if (g_issue_fcio_ioctl(fd, &fcio, 0) !=
2584 (void) close(fd);
2604 (void) close(fd);
2618 if (ioctl(fd, SFIOCGMAP, &sf_map) != 0) {
2620 (void) close(fd);
2626 (void) close(fd);
2632 (void) close(fd);
2638 (void) close(fd);
2645 (void) close(fd);
2654 (void) close(fd);
2672 (void) close(fd);
2683 (void) close(fd);
2696 (void) close(fd);
2706 (void) close(fd);
2716 (void) close(fd);
2729 (void) close(fd);
2746 (void) close(fd);
2757 close(fd);
3324 int fd, fp_fd, err, length, exp_map_flag = 0, *port_addr;
3429 if ((fd = g_object_open(nexus_path,
3437 if (ioctl(fd, FCIO_GETMAP, &map) != 0) {
3439 if (ioctl(fd, SFIOCGMAP, &exp_map) != 0) {
3441 (void) close(fd);
3447 (void) close(fd);
3452 (void) close(fd);
3464 (void) close(fd);
3472 close(fd);
3494 if (ioctl(fd, FCIO_LINKSTATUS, &c1->payload) != 0) {
3517 (void) close(fd);
3526 (void) close(fd);
3558 close(fd);
3942 int fd, status = 0;
3955 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1) {
3962 if ((g_find_supported_inq_page(fd, 0x80))) {
3967 status = g_scsi_inquiry_cmd80(fd,
3994 (void) close(fd);
4001 int fd, status;
4013 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1)
4015 status = g_scsi_inquiry_cmd(fd,
4018 (void) close(fd);
4026 g_scsi_inquiry_cmd80(int fd, uchar_t *buf_ptr, int buf_len)
4042 return (cmd(fd, &ucmd, USCSI_READ | USCSI_SILENT));
4049 g_find_supported_inq_page(int fd, int page_num)
4068 status = cmd(fd, &ucmd, USCSI_READ | USCSI_SILENT);
4085 int fd;
4095 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1)
4104 (void) close(fd);
4114 int fd;
4117 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1)
4119 status = g_scsi_start_cmd(fd);
4120 (void) close(fd);
4127 int status, fd;
4130 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1)
4132 status = g_scsi_stop_cmd(fd, immediate_flag);
4133 (void) close(fd);
4140 int fd, status;
4143 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1)
4145 status = g_scsi_reserve_cmd(fd);
4146 (void) close(fd);
4153 int fd, status;
4156 if ((fd = g_object_open(path, O_NDELAY | O_RDONLY)) == -1)
4158 status = g_scsi_release_cmd(fd);
4159 (void) close(fd);
4764 int fd, i = 0, pathcnt = 1;
4865 if ((fd = g_object_open(drvr_path, O_NDELAY | O_RDONLY)) == -1)
4875 if (g_issue_fcio_ioctl(fd, &fcio, verbose) != 0) {
4877 close(fd);
4880 close(fd);
4901 int path_type, fd;
4907 if ((fd = g_object_open(nexus_port_ptr, O_NDELAY|O_RDONLY)) == -1) {
4919 if (ioctl(fd, FCIO_LOOPBACK_INTERNAL,
4921 close(fd);
4932 close(fd);
4943 if (ioctl(fd, FCIO_NO_LOOPBACK, NULL) == -1) {
4944 close(fd);
4955 close(fd);
4960 close(fd);
4963 close(fd);
5000 int path_type, fd;
5006 if ((fd = g_object_open(portpath, O_NDELAY|O_RDONLY|O_EXCL)) == -1) {
5022 if (ioctl(fd, FCIO_LOOPBACK_MANUAL,
5026 close(fd);
5034 close(fd);
5040 if (ioctl(fd, FCIO_NO_LOOPBACK, NULL) == -1) {
5041 close(fd);
5048 close(fd);
5054 if (ioctl(fd, FCIO_LOOPBACK_INTERNAL,
5058 close(fd);
5066 close(fd);
5071 close(fd);
5074 close(fd);
5093 int fd, err, num_devices = 0;
5141 if ((fd = g_object_open(portpath, O_NDELAY | O_RDONLY)) == -1) {
5149 if (ioctl(fd, FCIO_GETMAP, &map) != 0) {
5157 (void) close(fd);
5213 int fd, err;
5229 if ((fd = g_object_open(port_path, O_NDELAY | O_RDONLY | O_EXCL)) == -1)
5242 if (g_issue_fcio_ioctl(fd, &fcio, verbose) != 0) {
5246 (void) close(fd);
5251 (void) close(fd);
5351 int fd;
5365 if ((fd = g_object_open(fca_path, O_NDELAY | O_RDONLY)) == -1)
5380 if (g_issue_fcio_ioctl(fd, &fcio, verbose) != 0) {
5382 (void) close(fd);
5385 (void) close(fd);
5985 int fd;
6017 if ((fd = g_object_open(result, O_NDELAY | O_RDONLY)) != -1) {
6018 close(fd);