* [PATCH 5/5] fdisk: gpt: use swap_efi_guid for new partitions
@ 2012-10-07 14:34 Davidlohr Bueso
2012-10-18 10:18 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2012-10-07 14:34 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
fdisks/gpt.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/fdisks/gpt.c b/fdisks/gpt.c
index 467b944..5b792a6 100644
--- a/fdisks/gpt.c
+++ b/fdisks/gpt.c
@@ -1430,17 +1430,7 @@ static int gpt_create_new_partition(int partnum, uint64_t fsect, uint64_t lsect,
* to have a unique GUID.
*/
uuid_generate_random((unsigned char *) &e->unique_partition_guid);
-
- /*
- * UUID is traditionally 16 byte big-endian array, except Intel EFI
- * specs where the UUID is a structure of little-endian fields, convert.
- */
- e->unique_partition_guid.time_low =
- cpu_to_le32(e->unique_partition_guid.time_low);
- e->unique_partition_guid.time_mid =
- cpu_to_le16(e->unique_partition_guid.time_mid);
- e->unique_partition_guid.time_hi_and_version =
- cpu_to_le16(e->unique_partition_guid.time_hi_and_version);
+ swap_efi_guid(&e->unique_partition_guid);
memcpy(&entries[partnum] , e, sizeof(*e));
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-18 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07 14:34 [PATCH 5/5] fdisk: gpt: use swap_efi_guid for new partitions Davidlohr Bueso
2012-10-18 10:18 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).