diff options
author | Karel Zak | 2016-02-18 12:42:06 +0100 |
---|---|---|
committer | Karel Zak | 2016-02-18 12:58:12 +0100 |
commit | 6cbb7371b349c63c6f3ba59a14acb0afc8ca3bde (patch) | |
tree | 5aaf4727f1285dc7eec602a51c7144b8c160abaf /libfdisk/src/fdiskP.h | |
parent | unshare: fix busyloop and reduce racing probability (diff) | |
download | kernel-qcow2-util-linux-6cbb7371b349c63c6f3ba59a14acb0afc8ca3bde.tar.gz kernel-qcow2-util-linux-6cbb7371b349c63c6f3ba59a14acb0afc8ca3bde.tar.xz kernel-qcow2-util-linux-6cbb7371b349c63c6f3ba59a14acb0afc8ca3bde.zip |
libfdisk: add API to control signatures wiping
Now libfdisk warns if another filesystem/RAID/PT signature is detected
on the device. It seems better and user-friendly to make it possible to
wipe the signatures when we write a new disk label to the device.
This patch adds to the library API
fdisk_enable_wipe()
fdisk_has_wipe()
fdisk_get_collision()
to control this new feature. The device modification is done by
libblkid (the same we use in some mkfs-like utils).
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/fdiskP.h')
-rw-r--r-- | libfdisk/src/fdiskP.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h index 2961095c9..494eda989 100644 --- a/libfdisk/src/fdiskP.h +++ b/libfdisk/src/fdiskP.h @@ -355,8 +355,11 @@ struct fdisk_context { display_in_cyl_units : 1, /* for obscure labels */ display_details : 1, /* expert display mode */ protect_bootbits : 1, /* don't zeroize fll irst sector */ + wipe_device : 1, /* wipe device before write */ listonly : 1; /* list partition, nothing else */ + char *collision; /* name of already existing FS/PT */ + int sizeunit; /* SIZE fields, FDISK_SIZEUNIT_* */ /* alignment */ @@ -386,6 +389,8 @@ struct fdisk_context { struct fdisk_script *script; /* what we want to follow */ }; +int fdisk_wipe_collisions(struct fdisk_context *cxt); + /* partition.c */ int fdisk_partition_next_partno(struct fdisk_partition *pa, struct fdisk_context *cxt, |