diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2020-01-13 16:09:40 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2020-01-13 16:09:40 +0000 |
commit | 5c4da6500d9a3207d7bdcff07a293f0e48030e6c (patch) | |
tree | 2957a50f4a75bbebdc9df4e2e740937469c01c92 /lib | |
parent | 24756b8bcdef7c905d01d53795e5b04ee7ee3b2b (diff) | |
parent | 35d824e362df862215f987fdf844ccfb8d9ccd92 (diff) |
Merge "Make TFTF RFC 4122 compliant"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/uuid.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/utils/uuid.c b/lib/utils/uuid.c index 2c79dfb..52af1e7 100644 --- a/lib/utils/uuid.c +++ b/lib/utils/uuid.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, Arm Limited. All rights reserved. + * Copyright (c) 2018-2020, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -10,9 +10,9 @@ #include <uuid_utils.h> /* Format string to print a UUID */ -static const char *uuid_str_fmt = "{ 0x%08x, 0x%04x, 0x%04x, 0x%02x, 0x%02x, " - "0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x }"; - +static const char *uuid_str_fmt = "{ 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, " + "0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, " + "0x%02x, 0x%02x }"; unsigned int is_uuid_null(const uuid_t *uuid) { @@ -27,7 +27,10 @@ char *uuid_to_str(const uuid_t *uuid, char *str) assert(str != NULL); snprintf(str, UUID_STR_SIZE, uuid_str_fmt, - uuid->time_low, uuid->time_mid, uuid->time_hi_and_version, + uuid->time_low[0], uuid->time_low[1], + uuid->time_low[2], uuid->time_low[3], + uuid->time_mid[0], uuid->time_mid[1], + uuid->time_hi_and_version[0], uuid->time_hi_and_version[1], uuid->clock_seq_hi_and_reserved, uuid->clock_seq_low, uuid->node[0], uuid->node[1], uuid->node[2], uuid->node[3], uuid->node[4], uuid->node[5]); |