From 992f7cbae420ab1b71fd9f2c2ae10c9804c1d213 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Jul 2017 11:30:57 +0200 Subject: libfdisk: add fdisk_disable_dialogs() The default (for historical reasons) is to use dialog driven partitioning. It's possible to avoid dialogs by fdisk_partition template for fdisk_add_partition(). Unfortunately in some case (mostly DOS driver) it's not enough, because we need to distinguish between logical and primary partitions. If we know that dialogs are unwanted then we can default to primary partition, etc. This function simplify semantic of the library for non-interactive programs. Signed-off-by: Karel Zak --- libfdisk/src/fdiskP.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libfdisk/src/fdiskP.h') diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h index 434490edd..77ad7610d 100644 --- a/libfdisk/src/fdiskP.h +++ b/libfdisk/src/fdiskP.h @@ -378,6 +378,7 @@ struct fdisk_context { display_details : 1, /* expert display mode */ protect_bootbits : 1, /* don't zeroize first sector */ pt_collision : 1, /* another PT detected by libblkid */ + no_disalogs : 1, /* disable dialog-driven partititoning */ listonly : 1; /* list partition, nothing else */ char *collision; /* name of already existing FS/PT */ -- cgit v1.2.3-55-g7522