The convention here is to return negative target errnos. Plus fix minor whitespace diffs.
Signed-off-by: Warner Losh <[email protected]> --- bsd-user/freebsd/os-syscall.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index f1a49ae423..c8f88efc6f 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -1589,19 +1589,18 @@ static abi_long freebsd_syscall(CPUArchState *env, int num, abi_long arg1, break; #endif case TARGET_FREEBSD_NR_kenv: - ret = do_freebsd_kenv(arg1, arg2, arg3, arg4); - break; + ret = do_freebsd_kenv(arg1, arg2, arg3, arg4); + break; /* XXX */ case TARGET_FREEBSD_NR_cap_rights_limit: case TARGET_FREEBSD_NR_cap_ioctls_limit: case TARGET_FREEBSD_NR_cap_fcntls_limit: - ret = EINVAL; - break; + ret = -TARGET_EINVAL; + break; case TARGET_FREEBSD_NR_cap_enter: - ret = 0; - break; - + ret = 0; + break; default: qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num); -- 2.52.0
