]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mkswap: wipe old signature if there is no part table by default
authorMilan Broz <mbroz@redhat.com>
Mon, 10 Sep 2012 10:58:39 +0000 (12:58 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 10:43:33 +0000 (12:43 +0200)
commitc1f1b301718ec0f5ffeae5b631c3ff38455b9ccd
treeccc4827512fdeef5e06a58f42d753eb5bc52b2e1
parent4082ab2c6fa51bdc67893c3422b9616dd1d49d83
mkswap: wipe old signature if there is no part table by default

Historically mkswap avoids wiping any signature on "whole disk",
until force option is given.

While the idea is that it should not wipe possible boot loader,
in reality it leads to many situations where e.g. LUKS device
is overwritten but still can be detected as LUKS (but unusable).

Patch chnges behaviour that only if partition table is detected,
signatures are not wiped.

Also it removes check for block device - loop device can now
map partitions in-kernel, so using mkswap on disk image in file
should behave the same as on disk.

Also it adds warning that know signature was wiped.

Signed-off-by: Milan Broz <mbroz@redhat.com>
disk-utils/mkswap.8
disk-utils/mkswap.c