qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 06/11] bsd-user: Helper routines h2g_old_sysctl


From: Richard Henderson
Subject: Re: [PATCH v3 06/11] bsd-user: Helper routines h2g_old_sysctl
Date: Fri, 17 Feb 2023 07:41:08 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/16/23 13:33, Warner Losh wrote:
h2g_old_sysctl does the byte swapping in the data to return it to the
target for the 'well known' types. For most of the types, either the
data is returned verbatim (strings, byte size, opaque we don't know
about) or it's returned with byte swapping (for all the integer
types). However, for ABI32 targets, LONG and ULONG are different sizes,
and need to be carefully converted (along with help from the caller).

Co-Authored-by: Sean Bruno<sbruno@FreeBSD.org>
Signed-off-by: Sean Bruno<sbruno@FreeBSD.org>
Co-Authored-by: Juergen Lock<nox@jelal.kn-bremen.de>
Signed-off-by: Juergen Lock<nox@jelal.kn-bremen.de>
Co-Authored-by: Raphael Kubo da Costa<rakuco@FreeBSD.org>
Signed-off-by: Raphael Kubo da Costa<rakuco@FreeBSD.org>
Co-Authored-by: Stacey Son<sson@FreeBSD.org>
Signed-off-by: Stacey Son<sson@FreeBSD.org>
Signed-off-by: Warner Losh<imp@bsdimp.com>
---
  bsd-user/freebsd/os-sys.c | 100 ++++++++++++++++++++++++++++++++++++--
  1 file changed, 96 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

+        }
+        else {
+#ifdef TARGET_ABI32

} else {


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]