diff options
author | Alex James <theracermaster@gmail.com> | 2021-12-19 16:41:59 -0600 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2022-01-10 21:32:34 +0000 |
commit | 02001a38bef12d135c8c9991971d94c1a6544131 (patch) | |
tree | 24a26173f5210a1b6092994ee51229553671bcde /util/cbfstool/common.c | |
parent | f6e74c45c0fb46f5b3a16b3aef2cd90024521b53 (diff) | |
download | coreboot-02001a38bef12d135c8c9991971d94c1a6544131.tar.gz coreboot-02001a38bef12d135c8c9991971d94c1a6544131.tar.bz2 coreboot-02001a38bef12d135c8c9991971d94c1a6544131.zip |
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/common.c')
-rw-r--r-- | util/cbfstool/common.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c index 5889e2a937f6..ea22bd6460ee 100644 --- a/util/cbfstool/common.c +++ b/util/cbfstool/common.c @@ -15,17 +15,6 @@ /* Utilities */ int verbose = 0; -/* Small, OS/libc independent runtime check for endianness */ -int is_big_endian(void) -{ - static const uint32_t inttest = 0x12345678; - const uint8_t inttest_lsb = *(const uint8_t *)&inttest; - if (inttest_lsb == 0x12) { - return 1; - } - return 0; -} - static off_t get_file_size(FILE *f) { off_t fsize; |