HomeFreeBSD

cp: fall back to read/write if copy_file_range fails

Description

cp: fall back to read/write if copy_file_range fails

Even though copy_file_range has a file-system agnostic version, it still
fails on devfs (perhaps because the file descriptor is non-seekable?) In
that case, fallback to old-fashioned read/write. Fixes
"cp /dev/null /tmp/null"

PR: 249248
Reported by: Michael Butler
Reviewed by: mjg
MFC-With: 365549
Differential Revision: https://reviews.freebsd.org/D26395

Details

Provenance
asomersAuthored on Sep 11 2020, 8:49 PM
Parents
rGd8dc46f6e9d3: Add constant for the DE_CFG MSR on AMD CPUs.
Branches
Unknown
Tags
Unknown

Event Timeline