From d718ded056eefb6239bd2e0a57b7f6d99c6e9e4b Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Wed, 2 Apr 2014 10:20:03 +0200
Subject: lib: uuid: code refactor for proper maintain between uuid bin and
string
Changes in lib/uuid.c to:
- uuid_str_to_bin()
- uuid_bin_to_str()
New parameter is added to specify input/output string format in listed functions
This change allows easy recognize which UUID type is or should be stored in given
string array. Binary data of UUID and GUID is always stored in big endian, only
string representations are different as follows.
String byte: 0 36
String char: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
string UUID: be be be be be
string GUID: le le le be be
This patch also updates functions calls and declarations in a whole code.
Signed-off-by: Przemyslaw Marczak
Cc: Stephen Warren
Cc: Lukasz Majewski
Cc: trini@ti.com
---
net/bootp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'net')
diff --git a/net/bootp.c b/net/bootp.c
index 4300f1c..189a003 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -439,7 +439,7 @@ static int DhcpExtended(u8 *e, int message_type, IPaddr_t ServerID,
*e++ = 17;
*e++ = 0; /* type 0 - UUID */
- uuid_str_to_bin(uuid, e);
+ uuid_str_to_bin(uuid, e, UUID_STR_FORMAT_STD);
e += 16;
} else {
printf("Invalid pxeuuid: %s\n", uuid);
--
cgit v1.1