Page MenuHomeFreeBSD

cat: report copy_file_range() errors with the read filename
ClosedPublic

Authored by kevans on Sep 8 2023, 4:19 PM.
Tags
None
Referenced Files
F107895204: D41784.diff
Sun, Jan 19, 3:04 AM
Unknown Object (File)
Fri, Jan 17, 3:41 PM
Unknown Object (File)
Mon, Jan 13, 9:52 PM
Unknown Object (File)
Dec 14 2024, 11:03 AM
Unknown Object (File)
Nov 27 2024, 4:10 AM
Unknown Object (File)
Nov 19 2024, 5:37 PM
Unknown Object (File)
Nov 7 2024, 12:58 PM
Unknown Object (File)
Oct 21 2024, 9:47 AM
Subscribers

Details

Summary

The error may be due to an error while writing, but it's more helpful to
report what we were trying to from rather than "stdout" for these
errors. Noticed because of what happens now when cat gets an EISDIR
for reading from a dirfd:

kevans@ifrit:~$ cat /etc
cat: stdout: Is a directory

which, after this change, becomes:

kevans@aarch64-dev:~$ cat /etc
cat: /etc: Is a directory

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable