Home | History | Annotate | Download | only in ltpscsi

Lines Matching refs:outfd

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