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(-)