diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-11-16 15:41:57 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-11-18 00:58:07 +0100 |
commit | da6eadc840716eb29b0175f39b2790bba166db4a (patch) | |
tree | 2da0a94126432e7af409ed809ea3476a1e44597c /include | |
parent | 0f68ca18f491b4e53cec788b327a752cbeb43377 (diff) |
Add a single, central hex blob decoder
Since we need it twice (once for tar, once for the filemap xattr
parser), add a single, central implementation to libutil, add a
unit test for that implementation and then use it in both libtar
and gensquashfs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r-- | include/util/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/util/util.h b/include/util/util.h index 0161c2b..787580c 100644 --- a/include/util/util.h +++ b/include/util/util.h @@ -77,4 +77,7 @@ SQFS_INTERNAL int check_file_range_equal(sqfs_file_t *file, void *scratch, size_t scratch_size, sqfs_u64 loc_a, sqfs_u64 loc_b, sqfs_u64 size); +SQFS_INTERNAL int hex_decode(const char *in, size_t in_sz, + sqfs_u8 *out, size_t out_sz); + #endif /* SQFS_UTIL_H */ |