]> git.ipfire.org Git - thirdparty/systemd.git/commit
copy: Add COPY_TRUNCATE
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 1 Jun 2023 09:44:03 +0000 (11:44 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 1 Jun 2023 10:16:15 +0000 (12:16 +0200)
commitcc45eb592b38a6a5ebb5f9494b5d7cbdaab3675c
tree247faa1102f33486e7730abe384f8d2a2a92dd90
parentc4b7e0f812af70b65bc4b4391f2fa05da5023bca
copy: Add COPY_TRUNCATE

The file might grow more than the amount of data we end up writing,
so let's add a flag to truncate after writing to make sure the file
is only as large as it needs to be.
src/shared/copy.c
src/shared/copy.h