summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfs.h
diff options
context:
space:
mode:
authorAlex James <theracermaster@gmail.com>2021-12-19 16:41:59 -0600
committerJulius Werner <jwerner@chromium.org>2022-01-10 21:32:34 +0000
commit02001a38bef12d135c8c9991971d94c1a6544131 (patch)
tree24a26173f5210a1b6092994ee51229553671bcde /util/cbfstool/cbfs.h
parentf6e74c45c0fb46f5b3a16b3aef2cd90024521b53 (diff)
util/cbfstool: Replace swab.h with commonlib/bsd/sysincludes.h
Instead of maintaining another set of byteswapping functions in cbfstool, this change removes swab.h and replaces it with bsd/sysincludes.h from commonlib. Callers have been updated to use be32toh/be64toh/htobe32/htobe64 instead of ntohl/ntohll/htonl/htonll respectively. Change-Id: I54195865ab4042fcf83609fcf67ef8f33994d68e Signed-off-by: Alex James <theracermaster@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60233 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'util/cbfstool/cbfs.h')
-rw-r--r--util/cbfstool/cbfs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index 67dc6163f0..b04dfeca6c 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -54,7 +54,7 @@ static struct typedesc_t filetypes[] unused = {
{0, NULL}
};
-#define CBFS_SUBHEADER(_p) ( (void *) ((((uint8_t *) (_p)) + ntohl((_p)->offset))) )
+#define CBFS_SUBHEADER(_p) ( (void *) ((((uint8_t *) (_p)) + be32toh((_p)->offset))) )
static inline size_t cbfs_file_attr_hash_size(enum vb2_hash_algorithm algo)
{