Searched refs:file_fd (Results 1 – 5 of 5) sorted by relevance
/freebsd/contrib/netbsd-tests/fs/vfs/ |
H A D | t_rwtoro.c | 51 static int file_fd; variable 97 RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777)); in open_file_ro() 98 RL(rump_sys_close(file_fd)); in open_file_ro() 99 RL(file_fd = rump_sys_open(file_path, O_RDONLY)); in open_file_ro() 107 RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777)); in open_file_ro_unlink() 108 RL(rump_sys_close(file_fd)); in open_file_ro_unlink() 109 RL(file_fd = rump_sys_open(file_path, O_RDONLY)); in open_file_ro_unlink() 118 RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777)); in open_file_rw() 125 RL(rump_sys_close(file_fd)); in close_file()
|
/freebsd/tools/regression/sockets/sendfile/ |
H A D | sendfile.c | 78 static int file_fd; variable 277 len = lseek(file_fd, 0, SEEK_SET); in send_test() 282 if (fstat(file_fd, &st) < 0) in send_test() 313 if (sendfile(file_fd, connect_socket, test.offset, test.length, in send_test() 323 if (fstat(file_fd, &sb) == 0) in send_test() 346 if (ftruncate(file_fd, file_size) != 0) in write_test_file() 357 len = write(file_fd, page_buffer, file_size); in write_test_file() 361 len = lseek(file_fd, 0, SEEK_SET); in write_test_file() 465 file_fd = mkstemp(path); in main() 466 if (file_fd == -1) in main() [all …]
|
/freebsd/usr.bin/sed/ |
H A D | main.c | 503 FILE *file_fd; in next_files_have_lines() local 508 if ((file_fd = fopen(file->fname, "r")) == NULL) in next_files_have_lines() 511 if ((ch = getc(file_fd)) != EOF) { in next_files_have_lines() 516 ungetc(ch, file_fd); in next_files_have_lines() 517 fclose(file_fd); in next_files_have_lines() 521 fclose(file_fd); in next_files_have_lines()
|
/freebsd/share/examples/scsi_target/ |
H A D | scsi_target.c | 73 static int file_fd; variable 114 targ_fd = file_fd = kq_fd = -1; in main() 229 file_fd = open(file_name, O_RDWR); in main() 230 if (file_fd < 0) in main() 237 if (fstat(file_fd, &st) < 0) in main() 243 if (ioctl(file_fd, DIOCGMEDIASIZE, &mediasize) < 0) in main() 271 aio.aio_fildes = file_fd; in main() 885 c_descr->aiocb.aio_fildes = file_fd; in get_ctio()
|
/freebsd/usr.sbin/ctladm/ |
H A D | ctladm.c | 1637 int file_fd, do_stdio; in cctl_read_write() local 1650 file_fd = -1; in cctl_read_write() 1734 file_fd = STDOUT_FILENO; in cctl_read_write() 1736 file_fd = STDIN_FILENO; in cctl_read_write() 1739 file_fd = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); in cctl_read_write() 1740 if (file_fd == -1) { in cctl_read_write() 1752 bytes_read = read(file_fd, dataptr, databytes); in cctl_read_write() 1788 bytes_written = write(file_fd, dataptr, databytes); in cctl_read_write() 1805 && (file_fd != -1)) in cctl_read_write() 1806 close(file_fd); in cctl_read_write()
|