gpt: create empty disklabels
This patch enables creating a new, empty, GPT disklabel from either
an empty disk or one that already has a disklabel. For this
purpose, a 'g' option is added to the main menu and is visible to all
labels. Here's an example for a scsi_debug device (/dev/sdb):
...
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x20a614c8.
3696: fdisk: CONTEXT: zeroize in-memory first sector buffer
Command (m for help): g
3696: fdisk: LABEL: changing to gpt label
3696: fdisk: CONTEXT: zeroize in-memory first sector buffer
3696: fdisk: LABEL: created new empty GPT disklabel (GUID:
D4EA0706-F011-46DC-B7DE-
6A72C7090AF8)
Command (m for help): w
The partition table has been altered!
...
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>