]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: split label and label operations
authorKarel Zak <kzak@redhat.com>
Tue, 11 Dec 2012 11:56:27 +0000 (12:56 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Mar 2013 11:47:29 +0000 (12:47 +0100)
commit0c5d095e46306ed4d6009f56e0339857d733d72e
treeea751328b6a158c199c7595faf3200a8039dd176
parent171372d37ce16e2a28e106a764a211237fe4df75
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>
12 files changed:
fdisks/fdiskaixlabel.c
fdisks/fdiskbsdlabel.c
fdisks/fdiskdoslabel.c
fdisks/fdiskmaclabel.c
fdisks/fdisksgilabel.c
fdisks/fdisksunlabel.c
fdisks/gpt.c
libfdisk/src/alignment.c
libfdisk/src/context.c
libfdisk/src/fdiskP.h
libfdisk/src/label.c
libfdisk/src/libfdisk.h