View | Details | Raw Unified | Return to bug 252358 | Differences between
and this patch

Collapse All | Expand All

(-)bin/cp/utils.c (-2 / +2 lines)
Lines 77-83 __FBSDID("$FreeBSD: head/bin/cp/utils.c 365643 2020-09 Link Here
77
static int
77
static int
78
copy_fallback(int from_fd, int to_fd, char *buf, size_t bufsize)
78
copy_fallback(int from_fd, int to_fd, char *buf, size_t bufsize)
79
{
79
{
80
	int rcount;
80
	ssize_t rcount;
81
	ssize_t wresid, wcount = 0;
81
	ssize_t wresid, wcount = 0;
82
	char *bufp;
82
	char *bufp;
83
83
Lines 236-242 copy_file(const FTSENT *entp, int dne) Link Here
236
			do {
236
			do {
237
				if (use_copy_file_range) {
237
				if (use_copy_file_range) {
238
					rcount = copy_file_range(from_fd, NULL,
238
					rcount = copy_file_range(from_fd, NULL,
239
			    		    to_fd, NULL, bufsize, 0);
239
			    		    to_fd, NULL, SSIZE_MAX, 0);
240
					if (rcount < 0 && errno == EINVAL) {
240
					if (rcount < 0 && errno == EINVAL) {
241
						/* Prob a non-seekable FD */
241
						/* Prob a non-seekable FD */
242
						use_copy_file_range = 0;
242
						use_copy_file_range = 0;

Return to bug 252358