Lines Matching refs:outfd

223 	int outfd;  member
248 int outfd; member
2212 int infd, outfd, blocks; in do_scsi_device_read_write() local
2256 outfd = STDOUT_FILENO; in do_scsi_device_read_write()
2330 if ((outfd = open(outf, O_RDWR)) < 0) { in do_scsi_device_read_write()
2338 res = ioctl(outfd, SG_SET_RESERVED_SIZE, &t); in do_scsi_device_read_write()
2341 res = ioctl(outfd, SG_GET_VERSION_NUM, &t); in do_scsi_device_read_write()
2348 outfd = -1; /* don't bother opening */ in do_scsi_device_read_write()
2357 if ((outfd = open(outf, flags, 0666)) < 0) { in do_scsi_device_read_write()
2366 if ((outfd = open(outf, O_WRONLY)) < 0) { in do_scsi_device_read_write()
2379 if (llse_llseek(outfd, offset, SEEK_SET) < 0) { in do_scsi_device_read_write()
2390 if ((STDIN_FILENO == infd) && (STDOUT_FILENO == outfd)) { in do_scsi_device_read_write()
2416 res = read_capacity(outfd, &out_num_sect, &out_sect_sz); in do_scsi_device_read_write()
2421 read_capacity(outfd, &out_num_sect, in do_scsi_device_read_write()
2547 sg_write(outfd, wrkPos, blocks, seek, bs, in do_scsi_device_read_write()
2550 if (ioctl(outfd, SG_GET_RESERVED_SIZE, &buf_sz) in do_scsi_device_read_write()
2561 sg_write(outfd, wrkPos, blocks, seek, bs, in do_scsi_device_read_write()
2567 sg_write(outfd, wrkPos, blocks, seek, bs, in do_scsi_device_read_write()
2581 while (((res = write(outfd, wrkPos, blocks * bs)) < 0) in do_scsi_device_read_write()
2629 res = sync_cache(outfd); in do_scsi_device_read_write()
2633 res = sync_cache(outfd); in do_scsi_device_read_write()
2643 if ((STDOUT_FILENO != outfd) && (FT_DEV_NULL != out_type)) in do_scsi_device_read_write()
2644 close(outfd); in do_scsi_device_read_write()
6285 int infd, outfd, blocks; in do_scsi_sgm_read_write() local
6317 outfd = STDOUT_FILENO; in do_scsi_sgm_read_write()
6384 if ((outfd = open(outf, O_RDWR)) < 0) { in do_scsi_sgm_read_write()
6391 res = ioctl(outfd, SG_GET_VERSION_NUM, &t); in do_scsi_sgm_read_write()
6397 if (ioctl(outfd, SG_GET_RESERVED_SIZE, &t) < 0) { in do_scsi_sgm_read_write()
6404 (outfd, SG_SET_RESERVED_SIZE, in do_scsi_sgm_read_write()
6414 outfd, 0); in do_scsi_sgm_read_write()
6425 outfd = -1; /* don't bother opening */ in do_scsi_sgm_read_write()
6428 if ((outfd = in do_scsi_sgm_read_write()
6439 if ((outfd = open(outf, O_WRONLY)) < 0) { in do_scsi_sgm_read_write()
6451 if (llse_llseek(outfd, offset, SEEK_SET) < 0) { in do_scsi_sgm_read_write()
6462 if ((STDIN_FILENO == infd) && (STDOUT_FILENO == outfd)) { in do_scsi_sgm_read_write()
6501 res = read_capacity(outfd, &out_num_sect, &out_sect_sz); in do_scsi_sgm_read_write()
6506 read_capacity(outfd, &out_num_sect, in do_scsi_sgm_read_write()
6641 sg_write2(outfd, wrkPos, blocks, seek, bs, in do_scsi_sgm_read_write()
6647 sg_write2(outfd, wrkPos, blocks, seek, bs, in do_scsi_sgm_read_write()
6662 while (((res = write(outfd, wrkPos, blocks * bs)) < 0) in do_scsi_sgm_read_write()
6710 res = sync_cache(outfd); in do_scsi_sgm_read_write()
6714 res = sync_cache(outfd); in do_scsi_sgm_read_write()
6726 if ((STDOUT_FILENO != outfd) && (FT_DEV_NULL != out_type)) in do_scsi_sgm_read_write()
6727 close(outfd); in do_scsi_sgm_read_write()
6824 rep->outfd = clp->outfd; in read_write_thread()
6976 while (((res = write(clp->outfd, rep->buffp, in normal_out_operation()
7175 while (((res = write(rep->wr ? rep->outfd : rep->infd, hp, in sg_start_io()
7202 while (((res = read(wr ? rep->outfd : rep->infd, &io_hdr, in sg_finish_io()
7328 rcoll.outfd = STDOUT_FILENO; in do_scsi_sgp_read_write()
7378 if ((rcoll.outfd = open(outf, O_RDWR)) < 0) { in do_scsi_sgp_read_write()
7386 if (sg_prepare(rcoll.outfd, rcoll.bs, rcoll.bpt, in do_scsi_sgp_read_write()
7390 rcoll.outfd = -1; /* don't bother opening */ in do_scsi_sgp_read_write()
7393 if ((rcoll.outfd = in do_scsi_sgp_read_write()
7404 if ((rcoll.outfd = open(outf, O_WRONLY)) < 0) { in do_scsi_sgp_read_write()
7417 if (llse_llseek(rcoll.outfd, offset, SEEK_SET) < in do_scsi_sgp_read_write()
7429 if ((STDIN_FILENO == rcoll.infd) && (STDOUT_FILENO == rcoll.outfd)) { in do_scsi_sgp_read_write()
7457 read_capacity(rcoll.outfd, &out_num_sect, in do_scsi_sgp_read_write()
7463 read_capacity(rcoll.outfd, &out_num_sect, in do_scsi_sgp_read_write()
7602 res = sync_cache(rcoll.outfd); in do_scsi_sgp_read_write()
7606 res = sync_cache(rcoll.outfd); in do_scsi_sgp_read_write()
7619 if ((STDOUT_FILENO != rcoll.outfd) && (FT_DEV_NULL != rcoll.out_type)) in do_scsi_sgp_read_write()
7620 close(rcoll.outfd); in do_scsi_sgp_read_write()