cbfstool: Add bintohex function
We need to emit some hex strings. Change-Id: I9e7e184282f6ad0470f2e269f5dc874e78f8b697 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11766 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
committed by
Patrick Georgi
parent
8b29322557
commit
ca97fa7ac3
@@ -210,4 +210,11 @@ extern struct xdr xdr_le, xdr_be;
|
||||
size_t bgets(struct buffer *input, void *output, size_t len);
|
||||
size_t bputs(struct buffer *b, const void *data, size_t len);
|
||||
|
||||
/* Returns a 0-terminated string containing a hex representation of
|
||||
* len bytes starting at data.
|
||||
* The string is malloc'd and it's the caller's responsibility to free
|
||||
* the memory.
|
||||
* On error, bintohex returns NULL.
|
||||
*/
|
||||
char *bintohex(uint8_t *data, size_t len);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user