]> git.ipfire.org Git - thirdparty/util-linux.git/commit - libfdisk/src/context.c
libfdisk: add fdisk_wipe_partition()
authorKarel Zak <kzak@redhat.com>
Wed, 4 May 2016 10:32:52 +0000 (12:32 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 4 May 2016 10:32:52 +0000 (12:32 +0200)
commit131e38a28ea055548a098611eeba94078a17c19d
tree73a6f3d50e0b961740f1970d2a7f79abe93f2a3d
parent55ad13c26fe5d0e606be5a83937f31b8cf576588
libfdisk: add fdisk_wipe_partition()

Now libfdisk provides functionality wipe disk device only ([s]fdisk
option --wipe).

This patch allows to probe for filesystems/RAIDs on newly created
partitions.  It means we can remove signatures before the partition
node (device) is created. This reduces udev events and it's
unnecessary to call wipefs for all partitions.  For example

  sfdisk --wipe=always --wipe-partitions=always /dev/sda <<<
  ...
  EOF

is a elegant way how to create new disk layout without any obsolete
filesystems/RAIDs.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/docs/libfdisk-sections.txt
libfdisk/src/Makemodule.am
libfdisk/src/context.c
libfdisk/src/fdiskP.h
libfdisk/src/init.c
libfdisk/src/label.c
libfdisk/src/libfdisk.h.in
libfdisk/src/libfdisk.sym
libfdisk/src/partition.c
libfdisk/src/wipe.c [new file with mode: 0644]