]> git.ipfire.org Git - thirdparty/util-linux.git/commit
wipefs: don't erase nested partition tables by default
authorKarel Zak <kzak@redhat.com>
Thu, 24 Apr 2014 11:42:54 +0000 (13:42 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 24 Apr 2014 11:42:54 +0000 (13:42 +0200)
commit24ed07818403f2ce52f9116a749036d58b91ca81
treeb9cfac8da2bd0d21bb075266ef715b2eaf776b31
parentc425353570b3f8b429790ff8bbb959348eead233
wipefs: don't erase nested partition tables by default

It's possible the partition contains a partition table (BSD, or hybrid
boot images). It could be unexpected for users that the lost all (or
another) partitions when work with non-whole disk device. Let's
require --force.

For example:

 # wipefs --all /dev/sdb

erases all including partition table, but on hybrid disk where the
first partition starts at first sector (so partition table is within
the first partition):

 # wipefs --all /dev/sdb1
 /dev/sdb1: ignore nested "dos" partition table on non-whole disk device
 wipefs: Use the --force option to force erase.

asks for --force.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1077310
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/wipefs.8
misc-utils/wipefs.c