freebsd-dev/bin/cp
Alan Somers 1ea95ba231 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
2020-09-11 20:49:36 +00:00
..
cp.1 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
cp.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
extern.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
Makefile Explicitly add unmarked bin/ binaries to the runtime package. 2016-02-09 16:58:50 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
utils.c cp: fall back to read/write if copy_file_range fails 2020-09-11 20:49:36 +00:00