diff options
author | Karel Zak | 2013-06-12 17:09:28 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:47:01 +0200 |
commit | 950edd1a71d76a9fe6bbc72bba4efcb26cf723b7 (patch) | |
tree | f72bd7be52313595da83c20080306be4bfe5eca9 /libfdisk/src/parttype.c | |
parent | fdisk: (bsd) use libfdisk for partition number dialog (diff) | |
download | kernel-qcow2-util-linux-950edd1a71d76a9fe6bbc72bba4efcb26cf723b7.tar.gz kernel-qcow2-util-linux-950edd1a71d76a9fe6bbc72bba4efcb26cf723b7.tar.xz kernel-qcow2-util-linux-950edd1a71d76a9fe6bbc72bba4efcb26cf723b7.zip |
fdisk: use libfdisk to ask for partition type
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/parttype.c')
-rw-r--r-- | libfdisk/src/parttype.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c index e78b35594..8a13d7211 100644 --- a/libfdisk/src/parttype.c +++ b/libfdisk/src/parttype.c @@ -165,4 +165,19 @@ void fdisk_free_parttype(struct fdisk_parttype *t) } } +/** + * fdisk_is_parttype_string: + * @cxt: context + * + * Returns: 1 if the current label uses strings as partition type + * identifiers (e.g. GPT UUIDS) or 0. + */ +int fdisk_is_parttype_string(struct fdisk_context *cxt) +{ + assert(cxt); + assert(cxt->label); + if (cxt->label->parttypes && cxt->label->parttypes[0].typestr) + return 1; + return 0; +} |