repart: let's wipe the partition table ourselves
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Jul 2020 16:46:42 +0000 (18:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Aug 2020 20:00:24 +0000 (22:00 +0200)
commit81873a6b6c4dcbc967c0931a1973b383259e5f97
tree045b975b3facdd657571886d6910fbf0da0872ad
parentf28d4f42f4fa64fa9a58a0d6d5d566874a66171f
repart: let's wipe the partition table ourselves

Let's issue the wiping ourselves, so that we know it's done before we
write partition data onto the disk, and before the disk label
is written. Before this commit the writing of the disk label would imply
the wiping step, potentially overriding again what we just wrote into
the disk data section.

(Normally this shouldn't matter, since the partition table metadata
that the wiping process deletes is at the start and end of the disk
while we write our data to the middle, but you never know what kind of
weird signatures might exist that depart from that.)

(And effectively this ends up using the same wiping code, since that's
implemented in libblkkid, and libfdisk just acts as frontend to that
anyway. We now simply call it directly.)
src/partition/repart.c