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
Unknown Object (File)
Sun, Oct 12, 6:26 PM
Unknown Object (File)
Sun, Oct 5, 5:11 PM
Unknown Object (File)
Sat, Oct 4, 5:17 AM
Unknown Object (File)
Thu, Oct 2, 10:16 AM
Unknown Object (File)
Wed, Oct 1, 12:19 AM
Unknown Object (File)
Tue, Sep 30, 11:44 PM
Unknown Object (File)
Aug 31 2025, 1:05 AM
Unknown Object (File)
Aug 13 2025, 1:58 PM
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