]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: refactor out data copying
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Aug 2025 21:45:18 +0000 (14:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 16 Sep 2025 06:17:34 +0000 (23:17 -0700)
commit06a6758d036886d2e13c0c936fd65cee9eb223b4
tree20537a254afcd0c5846a2c6ed66e9f06237f16e2
parent12bacad85b753b75fe79c70fc7aa37877e995dbb
cp: refactor out data copying

* po/POTFILES.in, src/local.mk (copy_sources): Add the new file.
* src/copy.c: Move the #includes of alignalloc.h, buffer-lcm.h,
fadvise.h, full-write.h, ioblksize.h to copy-file-data.c.
(enum copy_debug_val, struct copy_debug): Move these decls to copy.h.
(punch_hole, create_hole, is_CLONENOTSUP, sparse_copy)
(write_zeros, lseek_copy, HAVE_STRUCT_STAT_ST_BLOCKS)
(enum scantype, struct scan_inference, infer_scantype):
Move to copy-file-data.c.
(copy_reg): Move the data-copying part of this function
to the new function copy_file_data in copy-file-data.c.
* src/copy-file-data.c: New file, taken from part of copy.c.
po/POTFILES.in
src/copy-file-data.c [new file with mode: 0644]
src/copy.c
src/copy.h
src/local.mk