util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 5/5] fdisk: gpt: use swap_efi_guid for new partitions
Date: Sun, 07 Oct 2012 16:34:08 +0200	[thread overview]
Message-ID: <1349620448.2548.10.camel@offbook> (raw)

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





             reply	other threads:[~2012-10-07 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 14:34 Davidlohr Bueso [this message]
2012-10-18 10:18 ` [PATCH 5/5] fdisk: gpt: use swap_efi_guid for new partitions Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349620448.2548.10.camel@offbook \
    --to=dave@gnu.org \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).