rimage/toml_utils: fix signature and doxygen of parse_uuid()

Add missing `const` and warn that the endianness can't be relied on.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-10-20 19:18:34 +00:00 committed by Kai Vehmanen
parent c180e8cb95
commit 20705ad4c1
2 changed files with 6 additions and 2 deletions

View File

@ -111,7 +111,11 @@ void parse_printable_key(const toml_table_t *table, struct parse_ctx *ctx, const
void parse_str_key(const toml_table_t *table, struct parse_ctx *ctx, const char *key,
char *dst, int capacity, int *error);
void parse_uuid(char *buf, uint8_t *uuid);
/**
* Parse UUID hex string into a byte array. The endianness of the output
* is architecture-dependent: do not use in any portable code.
*/
void parse_uuid(const char *buf, uint8_t *uuid);
/** version is stored as toml array with integer number, something like:
* "version = [1, 8]"

View File

@ -290,7 +290,7 @@ void parse_str_key(const toml_table_t *table, struct parse_ctx *ctx, const char
dst[capacity - 1] = 0;
}
void parse_uuid(char *buf, uint8_t *uuid)
void parse_uuid(const char *buf, uint8_t *uuid)
{
struct uuid_t id;
uint32_t d[11];