mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Work around copy_file_range() bug in eCryptFs
When programs like ar.ape and compile.ape are run on eCryptFs partitions on Linux, copy_file_range() will fail with EINVAL which is wrong because eCryptFs which doesn't support this system call, should raise EOPNOTSUPP See https://github.com/jart/cosmopolitan/discussions/1305
This commit is contained in:
parent
12cc2de22e
commit
fef24d622a
5 changed files with 9 additions and 3 deletions
|
@ -83,9 +83,11 @@ static void copy_file_range_init(void) {
|
|||
* @return number of bytes transferred, or -1 w/ errno
|
||||
* @raise EXDEV if source and destination are on different filesystems
|
||||
* @raise EBADF if `infd` or `outfd` aren't open files or append-only
|
||||
* @raise EOPNOTSUPP if filesystem doesn't support this operation
|
||||
* @raise EPERM if `fdout` refers to an immutable file on Linux
|
||||
* @raise ECANCELED if thread was cancelled in masked mode
|
||||
* @raise EINVAL if ranges overlap or `flags` is non-zero
|
||||
* @raise EINVAL on eCryptFs filesystems that have a bug
|
||||
* @raise EFBIG if `setrlimit(RLIMIT_FSIZE)` is exceeded
|
||||
* @raise EFAULT if one of the pointers memory is bad
|
||||
* @raise ERANGE if overflow happens computing ranges
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue