diff options
author | Karel Zak | 2014-08-15 10:49:51 +0200 |
---|---|---|
committer | Karel Zak | 2014-08-15 10:49:51 +0200 |
commit | 4af064f3fca711c009467fbc9b415c4cc077f993 (patch) | |
tree | 06f4270f2e82b14048edf4e578cf2c3b0e0ab28c /libfdisk/src/context.c | |
parent | libfdisk: more docs (diff) | |
download | kernel-qcow2-util-linux-4af064f3fca711c009467fbc9b415c4cc077f993.tar.gz kernel-qcow2-util-linux-4af064f3fca711c009467fbc9b415c4cc077f993.tar.xz kernel-qcow2-util-linux-4af064f3fca711c009467fbc9b415c4cc077f993.zip |
libfdisk: fdisk_label_is_labeltype()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/context.c')
-rw-r--r-- | libfdisk/src/context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c index 48dfe85ca..320b40b9b 100644 --- a/libfdisk/src/context.c +++ b/libfdisk/src/context.c @@ -252,15 +252,15 @@ int fdisk_has_label(struct fdisk_context *cxt) /** * fdisk_is_labeltype: * @cxt: fdisk context - * @l: disklabel type + * @l: FDISK_DISKLABEL_* * * See also fdisk_is_label() macro in libfdisk.h. - * - * Returns: return 1 if there is @l disklabel on the device. + * + * Returns: return 1 if the current label is @l */ int fdisk_is_labeltype(struct fdisk_context *cxt, enum fdisk_labeltype l) { - return cxt && cxt->label && cxt->label->id == l; + return cxt && fdisk_label_is_labeltype(cxt->label, l); } static void reset_context(struct fdisk_context *cxt) |