]> git.ipfire.org Git - thirdparty/systemd.git/commit
repart: Don't copy trailing padding when using --copy-from= 42976/head
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 9 Jul 2026 13:22:13 +0000 (15:22 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Mon, 13 Jul 2026 10:23:20 +0000 (12:23 +0200)
commit71d20a990ecac3cac635609a4fd1772861730a54
tree5da81a5b3232e63390a5066b6731d409a52cbe35
parent0df5ebc079df9dd0c55d56868ff92c86ebcbd6a1
repart: Don't copy trailing padding when using --copy-from=

Currently, --copy-from= copies the paddings in between the source partitions,
as well as the trailing padding that is at the end of the source partition table.
It doesn't copy the leading padding at the start of the source partition table
though.

This seems inconsistent, and likely it was an oversight that the trailing padding
is copied.

Fix that, and add a test to ensure we don't regress.
src/repart/repart.c
test/units/TEST-58-REPART.sh