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>
This commit is contained in:
committed by
Julius Werner
parent
f6e74c45c0
commit
02001a38be
@@ -356,11 +356,11 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
len = ntohl(cbfs_file->len);
|
||||
len = be32toh(cbfs_file->len);
|
||||
offset = offset_to_ptr(convert_to_from_top_aligned,
|
||||
&image.buffer,
|
||||
cbfs_get_entry_addr(&image, cbfs_file) +
|
||||
ntohl(cbfs_file->offset));
|
||||
be32toh(cbfs_file->offset));
|
||||
|
||||
|
||||
if (fit_add_entry(fit, offset, len, fit_type,
|
||||
@@ -384,7 +384,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
fit_address = offset_to_ptr(convert_to_from_top_aligned, &image.buffer,
|
||||
cbfs_get_entry_addr(&image, cbfs_file)
|
||||
+ ntohl(cbfs_file->offset));
|
||||
+ be32toh(cbfs_file->offset));
|
||||
|
||||
|
||||
if (set_fit_pointer(&bootblock, fit_address, convert_to_from_top_aligned,
|
||||
|
Reference in New Issue
Block a user