Skip to content

Commit

Permalink
rimage/toml_utils: fix signature and doxygen of parse_uuid()
Browse files Browse the repository at this point in the history
Add missing `const` and warn that the endianness can't be relied on.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb authored and kv2019i committed Oct 26, 2023
1 parent c180e8c commit 20705ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tools/rimage/src/include/rimage/toml_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down
2 changes: 1 addition & 1 deletion tools/rimage/src/toml_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 20705ad

Please sign in to comment.