|
|
05ad79 |
From a95f7a89ed81fb3d7c3135baae20b056b7f8e661 Mon Sep 17 00:00:00 2001
|
|
|
05ad79 |
From: Karel Zak <kzak@redhat.com>
|
|
|
05ad79 |
Date: Wed, 10 May 2017 15:26:55 +0200
|
|
|
05ad79 |
Subject: [PATCH] libfdisk: (gpt) fix UUID printing
|
|
|
05ad79 |
|
|
|
05ad79 |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1344726
|
|
|
05ad79 |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
05ad79 |
---
|
|
|
05ad79 |
libfdisk/src/gpt.c | 14 +++-----------
|
|
|
05ad79 |
1 file changed, 3 insertions(+), 11 deletions(-)
|
|
|
05ad79 |
|
|
|
05ad79 |
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
|
|
|
05ad79 |
index 899e1b2..612ce09 100644
|
|
|
05ad79 |
--- a/libfdisk/src/gpt.c
|
|
|
05ad79 |
+++ b/libfdisk/src/gpt.c
|
|
|
05ad79 |
@@ -1690,7 +1690,7 @@ static int gpt_create_disklabel(struct fdisk_context *cxt)
|
|
|
05ad79 |
{
|
|
|
05ad79 |
int rc = 0;
|
|
|
05ad79 |
ssize_t esz = 0;
|
|
|
05ad79 |
- struct gpt_guid *uid;
|
|
|
05ad79 |
+ char str[37];
|
|
|
05ad79 |
struct fdisk_gpt_label *gpt;
|
|
|
05ad79 |
|
|
|
05ad79 |
assert(cxt);
|
|
|
05ad79 |
@@ -1746,16 +1746,8 @@ static int gpt_create_disklabel(struct fdisk_context *cxt)
|
|
|
05ad79 |
cxt->label->nparts_max = le32_to_cpu(gpt->pheader->npartition_entries);
|
|
|
05ad79 |
cxt->label->nparts_cur = 0;
|
|
|
05ad79 |
|
|
|
05ad79 |
- uid = &gpt->pheader->disk_guid;
|
|
|
05ad79 |
- fdisk_info(cxt, _("Building a new GPT disklabel "
|
|
|
05ad79 |
- "(GUID: %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X)\n"),
|
|
|
05ad79 |
- uid->time_low, uid->time_mid,
|
|
|
05ad79 |
- uid->time_hi_and_version,
|
|
|
05ad79 |
- uid->clock_seq_hi,
|
|
|
05ad79 |
- uid->clock_seq_low,
|
|
|
05ad79 |
- uid->node[0], uid->node[1],
|
|
|
05ad79 |
- uid->node[2], uid->node[3],
|
|
|
05ad79 |
- uid->node[4], uid->node[5]);
|
|
|
05ad79 |
+ guid_to_string(&gpt->pheader->disk_guid, str);
|
|
|
05ad79 |
+ fdisk_info(cxt, _("Building a new GPT disklabel (GUID: %s)\n"), str);
|
|
|
05ad79 |
fdisk_label_set_changed(cxt->label, 1);
|
|
|
05ad79 |
done:
|
|
|
05ad79 |
return rc;
|
|
|
05ad79 |
--
|
|
|
05ad79 |
2.9.3
|
|
|
05ad79 |
|