summaryrefslogtreecommitdiff
path: root/libfdisk/src/label.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfdisk/src/label.c')
-rw-r--r--libfdisk/src/label.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libfdisk/src/label.c b/libfdisk/src/label.c
index 147918e0..95a0abfb 100644
--- a/libfdisk/src/label.c
+++ b/libfdisk/src/label.c
@@ -245,6 +245,20 @@ int fdisk_create_disklabel(struct fdisk_context *cxt, const char *name)
return cxt->label->op->create(cxt);
}
+
+int fdisk_locate_disklabel(struct fdisk_context *cxt, int n, const char **name,
+ off_t *offset, size_t *size)
+{
+ if (!cxt || !cxt->label)
+ return -EINVAL;
+ if (!cxt->label->op->locate)
+ return -ENOSYS;
+
+ DBG(LABEL, dbgprint("locating %d chunk of %s.", n, cxt->label->name));
+ return cxt->label->op->locate(cxt, n, name, offset, size);
+}
+
+
/**
* fdisk_get_disklabel_id:
* @cxt: fdisk context