- move MBR partition types to dos_part_types.h
- make dos_part_types.h independent on datetypes to keep it useful in
all fdisks
- add struct fdisk_parrtype
- move label specific partition types to context->label
Signed-off-by: Karel Zak <kzak@redhat.com>
Commit 79c8a145dd changed the numerical values of
fdisk_labeltype and broke the menu functionality, mixing main and expert menus.
Revert this change along with the label comment regarding it matching labeltype.
This is no longer valid since the original patch that lead to this modification
assumed that __probe_labels() would use these indices when creating a default
DOS/SUN disklabel, see http://www.spinics.net/lists/util-linux-ng/msg06509.html
Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
There is no reason for this to be global variable - it belongs
to the context.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
The context structure is the fdisk API's main data type as it keeps all data
together. Add the label structure to it, so that the pt-specific operations can
be called from the context.
[kzak@redhat.com: - merge with latest changes
- don't allocate the label, use const pointer]
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
This patch sets the initial layout for label specific operations. A
new fdisk_label structure is created that will hold all these ops,
like new, delete, write and probe, among others. For now only probing
is implemented. Once this design is established, a copy of the probed
label will be copied to the main context structure, where calling the
specific functions will save 'disklabel' checks. Debugging support is
added as well.
This patch passes regression tests and manually passes bsd, sun, dos
and sgi labels probes.
Reviewed-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>