From 134ab17fffb32a3f86debb4eec9df12f7f833a3b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 19 Mar 2025 12:54:31 +0100 Subject: load_aout: replace bswap_needed with big_endian Targets know whether they are big-endian more than they know if the endianness is different from the host: the former is mostly a constant, at least in machine creation code, while the latter has to be computed with TARGET_BIG_ENDIAN != HOST_BIG_ENDIAN or something like that. load_aout, however, takes a "bswap_needed" argument. Replace it with a "big_endian" argument; even though all users are big-endian, it is cheap enough to keep the optional swapping functionality even for little-endian boards. Signed-off-by: Paolo Bonzini --- include/hw/loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw') diff --git a/include/hw/loader.h b/include/hw/loader.h index 784a93d..d280dc3 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -190,7 +190,7 @@ ssize_t load_elf(const char *filename, void load_elf_hdr(const char *filename, void *hdr, bool *is64, Error **errp); ssize_t load_aout(const char *filename, hwaddr addr, int max_sz, - int bswap_needed, hwaddr target_page_size); + bool big_endian, hwaddr target_page_size); #define LOAD_UIMAGE_LOADADDR_INVALID (-1) -- cgit v1.1