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<[email protected]>
Signed-off-by: Sean Bruno<[email protected]>
Co-Authored-by: Juergen Lock<[email protected]>
Signed-off-by: Juergen Lock<[email protected]>
Co-Authored-by: Raphael Kubo da Costa<[email protected]>
Signed-off-by: Raphael Kubo da Costa<[email protected]>
Co-Authored-by: Stacey Son<[email protected]>
Signed-off-by: Stacey Son<[email protected]>
Signed-off-by: Warner Losh<[email protected]>
---
bsd-user/freebsd/os-sys.c | 100 ++++++++++++++++++++++++++++++++++++--
1 file changed, 96 insertions(+), 4 deletions(-)
Reviewed-by: Richard Henderson <[email protected]>
+ }
+ else {
+#ifdef TARGET_ABI32
} else {
r~