HomeFreeBSD

cat: report copy_file_range() errors with the read filename

Description

cat: report copy_file_range() errors with the read filename

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

Reviewed by: allanjude, des, mm
Differential Revision: https://reviews.freebsd.org/D41784

Details

Provenance
kevansAuthored on Dec 14 2024, 4:32 AM
Reviewer
allanjude
Differential Revision
D41784: cat: report copy_file_range() errors with the read filename
Parents
rG17aec740b0b2: devmatch: do nothing if booted in safe mode
Branches
Unknown
Tags
Unknown