summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/libfdisk.h
diff options
context:
space:
mode:
authorKarel Zak2012-12-11 12:56:27 +0100
committerKarel Zak2013-03-11 12:47:29 +0100
commit0c5d095e46306ed4d6009f56e0339857d733d72e (patch)
treeea751328b6a158c199c7595faf3200a8039dd176 /libfdisk/src/libfdisk.h
parentlibfdisk: cleanup the rest of fdisks/utils.c stuff (diff)
downloadkernel-qcow2-util-linux-0c5d095e46306ed4d6009f56e0339857d733d72e.tar.gz
kernel-qcow2-util-linux-0c5d095e46306ed4d6009f56e0339857d733d72e.tar.xz
kernel-qcow2-util-linux-0c5d095e46306ed4d6009f56e0339857d733d72e.zip
libfdisk: split label and label operations
Changes: - fdisk_label is a private label driver struct - generic header of the fdisk_label points to fdisk_label_operations - the private fdisk_label stuff is always allocated for all drivers during fdisk_context initialization - context->labels[] contains pointers to all supported labels (drivers) - context->label is a pointer to the currently used label This change allows to: - store label specific global settings (e.g. dos compatible mode, display units, ...) independently on the current label - add label specific function to the API Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/libfdisk.h')
-rw-r--r--libfdisk/src/libfdisk.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libfdisk/src/libfdisk.h b/libfdisk/src/libfdisk.h
index d719a5c8d..d72a60889 100644
--- a/libfdisk/src/libfdisk.h
+++ b/libfdisk/src/libfdisk.h
@@ -26,6 +26,7 @@ extern "C" {
#endif
struct fdisk_context;
+struct fdisk_label;
struct fdisk_parttype;
/*
@@ -50,6 +51,9 @@ extern struct fdisk_context *fdisk_new_context_from_filename(
const char *fname, int readonly);
extern void fdisk_free_context(struct fdisk_context *cxt);
+extern struct fdisk_label *fdisk_context_get_label(struct fdisk_context *cxt,
+ const char *name);
+
/* parttype.c */
extern struct fdisk_parttype *fdisk_get_parttype_from_code(struct fdisk_context *cxt,
unsigned int code);