libfdisk: support nested MBR

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: add 'M' to access GPT nested protective/hybrid MBR

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: fix printf stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: fix printf stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) be more verbose when change bootable flag

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: support extended attributes modification

 * GPT attributes defined by standard (e.g. legacy boot etc.)
 * attributes (bits 48-63) reserved for GUID specific attributes (used for example
   by MS Windows)

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: (gpt) add A,B,R,S expert commands to modify attributes

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: reorder intro warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: warn about obsolete signatures on the device

Signed-off-by: Karel Zak <kzak@redhat.com>
docs: update TODO, wipe check for fdisk already implemented

Note that rather than implement wipe command in fdisk it's better
inform users to call wipefs(8).

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) recover from corrupted primary/backup PT

We already have all code to support this feature, unfortunately
it was not used in gpt_probe_label()...

References: https://bugzilla.redhat.com/show_bug.cgi?id=1022217
Signed-off-by: Karel Zak <kzak@redhat.com>
tests: test corruted GPT headers

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) improve and cleanup recovery code

 * use AlternativeLBA rather than hardcoded offset to backup GPT
 * create gpt_copy_header()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) allow to work with hybrid GPT

Notes:

 * fdisk don't sync hybrid MBR with GPT
 * hybrid MBR is ignored and not overwritten by PBMR
 * users is informed about expert command 'M' to toggle between MBR
   and GPT mode. It's possible to manually modify hybrid MBR.

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