You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/semihosting
Sean Anderson 4f45b2c352 semihosting: Fix GDB File-I/O FLEN
fstat returns 0 on success and -1 on error. Since we have already
checked for error, ret must be zero. Therefore, any call to fstat on a
non-empty file will return -1/EOVERFLOW.

Restore the original logic that just did a byteswap. I don't really know
what the intention of the fixed commit was.

Fixes: a6300ed6b7 ("semihosting: Split out semihost_sys_flen")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20251027110344.2289945-36-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2 weeks ago
..
Kconfig semihosting: Restrict to TCG 1 year ago
arm-compat-semi-stub.c semihosting/guestfd: compile once for system/user 2 months ago
arm-compat-semi.c semihosting: Fix GDB File-I/O FLEN 2 weeks ago
config.c semihosting: fix memleak at semihosting_arg_fallback 2 years ago
console.c char: rename CharBackend->CharFrontend 2 weeks ago
guestfd.c semihosting/guestfd: compile once for system/user 2 months ago
meson.build semihosting/arm-compat-semi: compile once in system and per target for user mode 2 months ago
stubs-all.c semihosting: Move user-only implementation out-of-line 7 months ago
stubs-system.c semihosting: Move user-only implementation out-of-line 7 months ago
syscalls.c semihosting/syscalls: replace uint64_t with vaddr where appropriate 2 months ago
uaccess.c semihosting/uaccess: Remove uses of target_ulong type 5 months ago
user.c semihosting: Assert is_user in user-only semihosting_enabled 7 months ago