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)
Wed, May 20, 5:48 PM
Unknown Object (File)
Sat, May 16, 4:35 AM
Unknown Object (File)
Fri, May 15, 2:06 PM
Unknown Object (File)
Thu, May 14, 2:52 PM
Unknown Object (File)
Thu, May 14, 9:43 AM
Unknown Object (File)
Thu, May 14, 2:53 AM
Unknown Object (File)
Tue, May 12, 3:28 PM
Unknown Object (File)
Mon, May 11, 5:46 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