svn commit: r365643 - head/bin/cp
Konstantin Belousov
kostikbel at gmail.com
Fri Sep 11 21:43:35 UTC 2020
On Fri, Sep 11, 2020 at 08:49:36PM +0000, Alan Somers wrote:
> Author: asomers
> Date: Fri Sep 11 20:49:36 2020
> New Revision: 365643
> URL: https://svnweb.freebsd.org/changeset/base/365643
>
> Log:
> 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"
Devices are seekable.
The reason for EINVAL is that vn_copy_file_range() checks that both in and out
vnodes are VREG. For devfs, they are VCHR.
More information about the svn-src-all
mailing list