]> git.ipfire.org Git - thirdparty/systemd.git/commit
file-io: Fix copying sparse files
authorMichael A Cassaniti <michael@cassaniti.id.au>
Fri, 11 Aug 2023 06:41:56 +0000 (16:41 +1000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Aug 2023 12:30:54 +0000 (14:30 +0200)
commitc2dfcbd48e780e49bfc11f1c34077f6c98891e40
tree774d118fe31dbcfc2d9f3d2db239c092ec49b26e
parente868f5efae1fc4790957768bfb2f2417cabcfade
file-io: Fix copying sparse files

This change makes sure a data copy using copy_bytes() does not exceed the
max_bytes value when using COPY_HOLES and max_bytes stops before the next
data section.
src/shared/copy.c
src/test/test-copy.c