Home
last modified time | relevance | path

Searched refs:in_fd (Results 1 - 25 of 30) sorted by relevance

12

/third_party/ltp/testcases/kernel/syscalls/sendfile/
H A Dsendfile03.c11 * wrong out_fd or in_fd.
15 * - in_fd == -1
17 * - in_fd opened with O_WRONLY
24 static int in_fd; variable
29 int *in_fd; member
33 {&in_fd, &negative_fd, "out_fd=-1"},
34 {&in_fd, &in_fd, "out_fd=O_RDONLY"},
35 {&negative_fd, &out_fd, "in_fd=-1"},
41 in_fd in setup()
[all...]
H A Dsendfile08.c29 static int in_fd; variable
34 TEST(sendfile(out_fd, in_fd, NULL, strlen(TEST_MSG_IN))); in run()
54 in_fd = SAFE_CREAT(IN_FILE, 0700); in setup()
55 SAFE_WRITE(SAFE_WRITE_ALL, in_fd, TEST_MSG_IN, strlen(TEST_MSG_IN)); in setup()
56 SAFE_CLOSE(in_fd); in setup()
57 in_fd = SAFE_OPEN(IN_FILE, O_RDONLY); in setup()
65 SAFE_CLOSE(in_fd); in cleanup()
H A Dsendfile05.c22 static int in_fd; variable
27 in_fd = SAFE_OPEN("in_file", O_CREAT | O_RDWR, 0600); in setup()
33 SAFE_CLOSE(in_fd); in cleanup()
41 TST_EXP_FAIL(sendfile(out_fd, in_fd, &offset, 1), EINVAL, in run()
H A Dsendfile07.c21 static int in_fd; variable
29 in_fd = SAFE_OPEN("in_file", O_RDONLY); in setup()
54 SAFE_CLOSE(in_fd); in cleanup()
59 TST_EXP_FAIL(sendfile(out_fd, in_fd, NULL, 1), EAGAIN, in run()
60 "sendfile(out_fd, in_fd, NULL, 1) with blocked out_fd"); in run()
H A Dsendfile09.c64 int in_fd = SAFE_OPEN(IN_FILE, O_RDONLY); in run() local
69 before_pos = SAFE_LSEEK(in_fd, 0, SEEK_CUR); in run()
71 TEST(sendfile(out_fd, in_fd, &offset, tc[i].count)); in run()
72 after_pos = SAFE_LSEEK(in_fd, 0, SEEK_CUR); in run()
83 tst_res(TFAIL, "sendfile() updated the file position of in_fd " in run()
90 SAFE_CLOSE(in_fd); in run()
H A Dsendfile02.c56 int in_fd = SAFE_OPEN(IN_FILE, O_RDONLY); in run() local
61 before_pos = SAFE_LSEEK(in_fd, 0, SEEK_CUR); in run()
63 TEST(sendfile(out_fd, in_fd, &offset, tc[i].count)); in run()
64 after_pos = SAFE_LSEEK(in_fd, 0, SEEK_CUR); in run()
75 tst_res(TFAIL, "sendfile() updated the file position of in_fd " in run()
82 SAFE_CLOSE(in_fd); in run()
H A Dsendfile04.c25 static int in_fd; variable
42 in_fd = SAFE_OPEN("in_file", O_CREAT | O_RDWR, 0600); in setup()
48 SAFE_CLOSE(in_fd); in cleanup()
62 TST_EXP_FAIL2(sendfile(out_fd, in_fd, protected_buffer, 1), in run()
H A Dsendfile06.c12 * Test that sendfile() system call updates file position of in_fd correctly
45 int in_fd = SAFE_OPEN(IN_FILE, O_RDONLY); in run() local
48 TEST(sendfile(out_fd, in_fd, NULL, sb.st_size)); in run()
49 after_pos = SAFE_LSEEK(in_fd, 0, SEEK_CUR); in run()
56 tst_res(TFAIL, "sendfile() updated the file position of in_fd unexpectedly," in run()
63 SAFE_CLOSE(in_fd); in run()
/third_party/rust/crates/nix/src/sys/
H A Dsendfile.rs12 /// Copy up to `count` bytes to `out_fd` from `in_fd` starting at `offset`.
16 /// If `offset` is `None`, `sendfile` will begin reading at the current offset of `in_fd`and will
17 /// update the offset of `in_fd`. If `offset` is `Some`, `sendfile` will begin at the specified
18 /// offset and will not update the offset of `in_fd`. Instead, it will mutate `offset` to point to
21 /// `in_fd` must support `mmap`-like operations and therefore cannot be a socket.
28 in_fd: RawFd, in sendfile()
35 let ret = unsafe { libc::sendfile(out_fd, in_fd, offset, count) }; in sendfile()
39 /// Copy up to `count` bytes to `out_fd` from `in_fd` starting at `offset`.
43 /// If `offset` is `None`, `sendfile` will begin reading at the current offset of `in_fd`and will
44 /// update the offset of `in_fd`
[all...]
/third_party/toybox/toys/lsb/
H A Dgzip.c68 // Read from in_fd, write to out_fd, decompress if dd else compress
69 static int do_deflate(int in_fd, int out_fd, int dd, int level) in do_deflate() argument
79 if (!(gz = gzdopen(dd ? in_fd : out_fd, b))) perror_exit("gzdopen"); in do_deflate()
85 while ((len = read(in_fd, toybuf, sizeof(toybuf))) > 0) in do_deflate()
102 // Read from in_fd, write to out_fd, decompress if dd else compress
103 static int do_deflate(int in_fd, int out_fd, int dd, int level)
107 if (dd) WOULD_EXIT(x, gunzip_fd(in_fd, out_fd));
108 else WOULD_EXIT(x, gzip_fd(in_fd, out_fd));
/third_party/mesa3d/src/imagination/vulkan/winsys/pvrsrvkm/
H A Dpvr_srv_job_compute.c176 int in_fd = -1; in pvr_srv_winsys_compute_submit() local
189 ret = sync_accumulate("", &in_fd, srv_wait_sync->fd); in pvr_srv_winsys_compute_submit()
206 in_fd, in pvr_srv_winsys_compute_submit()
235 if (in_fd >= 0) in pvr_srv_winsys_compute_submit()
236 close(in_fd); in pvr_srv_winsys_compute_submit()
H A Dpvr_srv_job_transfer.c203 int in_fd = -1; in pvr_srv_winsys_transfer_submit() local
237 ret = sync_accumulate("", &in_fd, srv_wait_sync->fd); in pvr_srv_winsys_transfer_submit()
257 in_fd, in pvr_srv_winsys_transfer_submit()
288 if (in_fd >= 0) in pvr_srv_winsys_transfer_submit()
289 close(in_fd); in pvr_srv_winsys_transfer_submit()
/third_party/musl/src/linux/
H A Dsendfile.c4 ssize_t sendfile(int out_fd, int in_fd, off_t *ofs, size_t count) in sendfile() argument
6 return syscall(SYS_sendfile, out_fd, in_fd, ofs, count); in sendfile()
/third_party/rust/crates/rustix/src/fs/
H A Dsendfile.rs4 /// `sendfile(out_fd, in_fd, offset, count)`
14 in_fd: InFd, in sendfile()
18 backend::fs::syscalls::sendfile(out_fd.as_fd(), in_fd.as_fd(), offset, count) in sendfile()
/third_party/exfatprogs/exfat2img/
H A Dexfat2img.c765 int in_fd, ret; in restore_from_stdin() local
775 in_fd = fileno(stdin); in restore_from_stdin()
776 if (in_fd < 0) { in restore_from_stdin()
778 return in_fd; in restore_from_stdin()
781 if (read_stream(in_fd, &ei_hdr, sizeof(ei_hdr)) != (ssize_t)sizeof(ei_hdr)) { in restore_from_stdin()
805 if (read_stream(in_fd, ei->dump_bdesc[0].buffer, len) != (ssize_t)len) { in restore_from_stdin()
829 if (read_stream(in_fd, &cc, sizeof(cc)) != (ssize_t)sizeof(cc)) { in restore_from_stdin()
838 if (read_stream(in_fd, &t_cc_clu_count, EI_CC_PAYLOAD_LEN) != in restore_from_stdin()
859 if (read_stream(in_fd, ei->dump_bdesc[0].buffer, in restore_from_stdin()
/third_party/node/deps/uv/src/unix/
H A Dfs.c805 int in_fd; in uv__fs_sendfile_emul() local
810 in_fd = req->flags; in uv__fs_sendfile_emul()
847 nread = pread(in_fd, buf, buflen, offset); in uv__fs_sendfile_emul()
849 nread = read(in_fd, buf, buflen); in uv__fs_sendfile_emul()
969 static ssize_t uv__fs_try_copy_file_range(int in_fd, off_t* off, in uv__fs_try_copy_file_range() argument
979 r = uv__fs_copy_file_range(in_fd, off, out_fd, NULL, len, 0); in uv__fs_try_copy_file_range()
989 if (uv__is_buggy_cephfs(in_fd)) in uv__fs_try_copy_file_range()
1005 * EXDEV - it will not work when in_fd and out_fd are not on the same in uv__fs_try_copy_file_range()
1019 int in_fd; in uv__fs_sendfile() local
1022 in_fd in uv__fs_sendfile()
2109 uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file out_fd, uv_file in_fd, int64_t off, size_t len, uv_fs_cb cb) uv_fs_sendfile() argument
[all...]
/third_party/libuv/src/unix/
H A Dfs.c752 int in_fd; in uv__fs_sendfile_emul() local
757 in_fd = req->flags; in uv__fs_sendfile_emul()
794 nread = pread(in_fd, buf, buflen, offset); in uv__fs_sendfile_emul()
796 nread = read(in_fd, buf, buflen); in uv__fs_sendfile_emul()
891 static ssize_t uv__fs_try_copy_file_range(int in_fd, off_t* off, in uv__fs_try_copy_file_range() argument
901 r = uv__fs_copy_file_range(in_fd, off, out_fd, NULL, len, 0); in uv__fs_try_copy_file_range()
911 if (uv__is_buggy_cephfs(in_fd)) in uv__fs_try_copy_file_range()
927 * EXDEV - it will not work when in_fd and out_fd are not on the same in uv__fs_try_copy_file_range()
941 int in_fd; in uv__fs_sendfile() local
944 in_fd in uv__fs_sendfile()
2027 uv_fs_sendfile(uv_loop_t* loop, uv_fs_t* req, uv_file out_fd, uv_file in_fd, int64_t off, size_t len, uv_fs_cb cb) uv_fs_sendfile() argument
[all...]
/third_party/toybox/toys/other/
H A Dbzcat.c84 int in_fd, inbufCount, inbufPos; member
120 if (0 >= (bd->inbufCount = read(bd->in_fd, bd->inbuf, IOBUF_SIZE))) in get_bits()
619 bd->in_fd = -1; in start_bunzip()
622 bd->in_fd = src_fd; in start_bunzip()
/third_party/python/Modules/clinic/
H A Dposixmodule.c.h5124 "sendfile($module, /, out_fd, in_fd, offset, count, headers=(),\n"
5128 "Copy count bytes from file descriptor in_fd to file descriptor out_fd.");
5134 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, Py_off_t offset,
5142 static const char * const _keywords[] = {"out_fd", "in_fd", "offset", "count", "headers", "trailers", "flags", NULL}; in os_sendfile()
5147 int in_fd; in os_sendfile() local
5162 in_fd = _PyLong_AsInt(args[1]); in os_sendfile()
5163 if (in_fd == -1 && PyErr_Occurred()) { in os_sendfile()
5192 return_value = os_sendfile_impl(module, out_fd, in_fd, offset, sbytes, headers, trailers, flags); in os_sendfile()
5203 "sendfile($module, /, out_fd, in_fd, offset, count, headers=(),\n"
5207 "Copy count bytes from file descriptor in_fd t
5226 int in_fd; os_sendfile() local
5311 int in_fd; os_sendfile() local
5366 int in_fd; os__fcopyfile() local
[all...]
/third_party/rust/crates/rustix/src/backend/linux_raw/fs/
H A Dsyscalls.rs1370 in_fd: BorrowedFd<'_>,
1379 in_fd,
1389 in_fd,
/third_party/python/Modules/
H A Dposixmodule.c9929 in_fd: int
9936 Copy count bytes from file descriptor in_fd to file descriptor out_fd.
9940 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, Py_off_t offset, in os_sendfile_impl() argument
9949 in_fd: int in os_sendfile_impl()
9956 Copy count bytes from file descriptor in_fd to file descriptor out_fd. in os_sendfile_impl()
9960 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, Py_off_t offset, in os_sendfile_impl()
9969 in_fd: int in os_sendfile_impl()
9973 Copy count bytes from file descriptor in_fd to file descriptor out_fd. in os_sendfile_impl()
9977 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, PyObject *offobj, in os_sendfile_impl()
10056 ret = sendfile(in_fd, out_f in os_sendfile_impl()
10168 os__fcopyfile_impl(PyObject *module, int in_fd, int out_fd, int flags) os__fcopyfile_impl() argument
[all...]
/third_party/python/Lib/test/
H A Dtest_os.py335 in_fd = in_file.fileno()
343 i = os.copy_file_range(in_fd, out_fd, 5)
372 in_fd = in_file.fileno()
380 i = os.copy_file_range(in_fd, out_fd, bytes_to_copy,
420 in_fd = in_file.fileno()
427 i = os.splice(in_fd, write_fd, 5)
455 in_fd = in_file.fileno()
462 i = os.splice(in_fd, write_fd, bytes_to_copy, offset_src=in_skip)
3485 await self.async_sendfile(out_fd=self.sockno, in_fd=self.fileno,
3488 await self.async_sendfile(out_fd=self.sockno, in_fd
[all...]
/third_party/backends/backend/
H A Dqcam.c815 reader_process (QC_Scanner * s, int in_fd, int out_fd) in reader_process() argument
850 if (read (in_fd, &req, sizeof (req)) != sizeof (req)) in reader_process()
/third_party/rust/crates/rustix/src/backend/libc/fs/
H A Dsyscalls.rs1313 in_fd: BorrowedFd<'_>,
1320 borrowed_fd(in_fd),
/third_party/libuv/include/
H A Duv.h1580 uv_file in_fd,

Completed in 43 milliseconds

12