]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: refactor copying to return bytes copied
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Aug 2025 16:55:41 +0000 (09:55 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 16 Sep 2025 06:17:35 +0000 (23:17 -0700)
commit3f9534a2abfd2f50fc9d4147c981ddabe64984d5
tree215976e76a25bbfa375cf61aa4584402327fcf20
parent560a39f7c04952f7ef7965c114115659a29b61fb
cp: refactor copying to return bytes copied

This doesn’t change behavior; it simplifies future changes.
* src/copy-file-data.c (sparse_copy, lseek_copy, copy_file_data):
Return the number of bytes copied, or -1 on failure,
instead of merely returning a success indication.
All callers changed.
src/copy-file-data.c
src/copy.c
src/copy.h