diff options
author | zijunzhao <zijunzhao@google.com> | 2022-04-22 18:08:09 +0000 |
---|---|---|
committer | Zijun Zhao <zijunzhao@google.com> | 2022-05-12 16:53:41 +0000 |
commit | c2e412e08641dafd0f8e0b8edd3e358082105a68 (patch) | |
tree | e2c2b763088271321dee044bb078ef643cc0129e /libc/include/unistd.h | |
parent | bcd8f15e27f1edc64b485259f05b4b4fe58408e8 (diff) | |
download | bionic-c2e412e08641dafd0f8e0b8edd3e358082105a68.tar.gz |
Add copy_file_range(2) syscall stub to bionic.
Test: treehugger
Bug: https://buganizer.corp.google.com/issues/227784687
Change-Id: I543306cd2234189401bf7c9d80d405eeb6e4d41d
Diffstat (limited to 'libc/include/unistd.h')
-rw-r--r-- | libc/include/unistd.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/include/unistd.h b/libc/include/unistd.h index f142525ba..b5694b8c3 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -313,6 +313,17 @@ int tcsetpgrp(int __fd, pid_t __pid); int getdomainname(char* __buf, size_t __buf_size) __INTRODUCED_IN(26); int setdomainname(const char* __name, size_t __n) __INTRODUCED_IN(26); +/** + * [copy_file_range(2)](https://man7.org/linux/man-pages/man2/copy_file_range.2.html) copies + * a range of data from one file descriptor to another. + * + * Returns the number of bytes copied on success, and returns -1 and sets errno + * on failure. + * + * Available since API level 34. + */ +ssize_t copy_file_range(int __fd_in, off64_t* __off_in, int __fd_out, off64_t* __off_out, size_t __length, unsigned int __flags) __INTRODUCED_IN(34); + #if __ANDROID_API__ >= 28 void swab(const void* __src, void* __dst, ssize_t __byte_count) __INTRODUCED_IN(28); #endif |