]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cat: don’t treat copy_file_range EFBIG as fatal
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Jan 2026 17:35:12 +0000 (09:35 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Jan 2026 18:12:39 +0000 (10:12 -0800)
commitcf36efedc01cda41863fdad257e1b5ca36c5a81d
treef190b53653f9ddcb66b4502f4ddaf63cb04926f2
parent0dd30755ab283aca70e5dfa58cdd721eff873e48
cat: don’t treat copy_file_range EFBIG as fatal

* src/cat.c (copy_cat):
* src/copy-file-data.c (sparse_copy):
Don’t treat EFBIG as a reportable error from copy_file_range.
If the input is at EOF and the output position is 2**63 - 1,
copy_file_range (ifd, NULL, ofd, NULL, 2146435072, 0)
incorrectly fails with EFBIG.  Problem observed on Ubuntu 25.10
x86-64 with Linux kernel 6.17.0-8-generic #8-Ubuntu.
I am too lazy to report this kernel bug or add a coreutils test case.
src/cat.c
src/copy-file-data.c