libfdisk: (gpt) introduce driver independent partitions counters

 label->nparts_{max,cur} to later replace global variable partitions

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (aix) remove unuused variable 'partitions'

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (bsd) add partitions counters

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (sun) remove global variable 'partitions'

 * use label counters
 * add assert()
 * use struct fdisk_label if possible

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (sun) remove nasty sunlabel macro

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: add label->changed flag

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: use libfdisk label->changed

The patch is huge because it's necessary to add a pointer context to
all read_<foo> functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move list table code to fdiskdoslabe.c

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move fix order code to fdiskdoslabe.c

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move 'move begin' code to fdiskdoslabe.c

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move dos_list_table_expert() to fdiskdoslabe.c

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: remove dead code

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move dos specific code

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move 'toggle active' code to fdiskdoslabe.c

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) move dos specific code

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: cleanup fdisk_get_partition_type() returns

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: add part_get_status operation

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (dos) kill 'partitions' global variable

 ... and use size_t for partition numbers

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) move code from fdisk to libfdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: remove fdisk_label from API functions, add asserts, use size_t

Signed-off-by: Karel Zak <kzak@redhat.com>