diff options
author | Karel Zak | 2017-02-14 14:23:45 +0100 |
---|---|---|
committer | Karel Zak | 2017-02-14 14:23:45 +0100 |
commit | 0cec78a3c467dfbda06bb846f3a8d861f313ccc3 (patch) | |
tree | 7f206d2e82cea6bc7ae62782f43b9b1703596308 /libfdisk/src/context.c | |
parent | libfdisk: check for collisions when create new label (diff) | |
download | kernel-qcow2-util-linux-0cec78a3c467dfbda06bb846f3a8d861f313ccc3.tar.gz kernel-qcow2-util-linux-0cec78a3c467dfbda06bb846f3a8d861f313ccc3.tar.xz kernel-qcow2-util-linux-0cec78a3c467dfbda06bb846f3a8d861f313ccc3.zip |
libfdisk: classify collision type
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/context.c')
-rw-r--r-- | libfdisk/src/context.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c index 77bc19c94..5ea8dccd4 100644 --- a/libfdisk/src/context.c +++ b/libfdisk/src/context.c @@ -389,6 +389,21 @@ const char *fdisk_get_collision(struct fdisk_context *cxt) } /** + * fdisk_is_ptcollision: + * @cxt: fdisk context + * + * The collision detected by library is another partition table. Note that libfdisk + * does not support all partitions tables, so fdisk_has_label() may return false and + * fdisk_is_ptcollision() may return true. + * + * Returns: 0 or 1 + */ +int fdisk_is_ptcollision(struct fdisk_context *cxt) +{ + return cxt->pt_collision; +} + +/** * fdisk_get_npartitions: * @cxt: context * |