From: Karel Zak Date: Tue, 4 Dec 2012 13:58:55 +0000 (+0100) Subject: fdisk: report PT type, inform about new GPT X-Git-Tag: v2.23-rc1~454 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b546d442262fadfa8188a5056e208afd1427251a;p=thirdparty%2Futil-linux.git fdisk: report PT type, inform about new GPT Signed-off-by: Karel Zak --- diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index fb2073ab89..7c3fee4b8e 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -880,6 +880,8 @@ list_disk_geometry(struct fdisk_context *cxt) { cxt->min_io_size, cxt->io_size); if (cxt->alignment_offset) printf(_("Alignment offset: %lu bytes\n"), cxt->alignment_offset); + if (fdisk_dev_has_disklabel(cxt)) + printf(_("Disk label type: %s\n"), cxt->label->name); if (fdisk_is_disklabel(cxt, DOS)) dos_print_mbr_id(cxt); printf("\n"); diff --git a/fdisks/gpt.c b/fdisks/gpt.c index 21a7cad67d..9c9a2ac8db 100644 --- a/fdisks/gpt.c +++ b/fdisks/gpt.c @@ -1557,15 +1557,15 @@ static int gpt_create_disklabel(struct fdisk_context *cxt) gpt_recompute_crc(bheader, ents); gpt_init(cxt); - DBG(LABEL, dbgprint("created new empty GPT disklabel " - "(GUID: %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X)", + fprintf(stderr, ("Building a new GPT disklabel " + "(GUID: %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X)\n"), pheader->disk_guid.time_low, pheader->disk_guid.time_mid, pheader->disk_guid.time_hi_and_version, pheader->disk_guid.clock_seq_hi, pheader->disk_guid.clock_seq_low, pheader->disk_guid.node[0], pheader->disk_guid.node[1], pheader->disk_guid.node[2], pheader->disk_guid.node[3], - pheader->disk_guid.node[4], pheader->disk_guid.node[5])); + pheader->disk_guid.node[4], pheader->disk_guid.node[5]); done: return rc; }