Hello,
On 03/14/2014 05:06 PM, Wolfgang Denk wrote:
Dear Przemyslaw Marczak,
In message
<5ef7cdb8df4fb05c3c371e29d7a61e28e1563a68.1394807506.git.p.marc...@samsung.com>
you wrote:
Changes:
- move uuid<->string conversion functions into lib/uuid.c so they can be
used by code outside part_efi.c.
- rename uuid_string() to uuid_bin_to_str() for consistency with existing
uuid_str_to_bin()
- add an error return code to uuid_str_to_bin()
Update existing code to the new library functions.
...
+void uuid_bin_to_str(unsigned char *uuid, char *str)
+{
+ static const u8 le[16] = {3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11,
+ 12, 13, 14, 15};
+ int i;
+
+ for (i = 0; i < 16; i++) {
+ sprintf(str, "%02x", uuid[le[i]]);
You mentioned before that the UUID format was big endian. Hoever,
here you always use trhe same byte order 3-2-1-0 when formatting the
initi "int" field - you do not take into account whether this code is
running on a BE or a LE system. Is this code not only correct for LE
systems, but broken when running on a BE machine?
Best regards,
Wolfgang Denk
Right notice, this function should include all inverted operations from
uuid_str_to_bin(), I will correct this.
Thank you
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marc...@samsung.com
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot