Re: [PATCH 8/9] bsd-user: implement sysctlbyname(2)

2023-02-12 Thread Richard Henderson
On 2/11/23 18:23, Kyle Evans wrote: +/* + * This syscall was created to make sysctlbyname(3) more efficient. + * Unfortunately, because we have to fake some sysctls, we can't do that. Can't do what? Directly use sysctlbyname? How about: /* * This syscall was created to make sysctlbyname(

Re: [PATCH 8/9] bsd-user: implement sysctlbyname(2)

2023-02-11 Thread Kyle Evans
On Sat, Feb 11, 2023 at 5:13 PM Richard Henderson wrote: > > On 2/10/23 13:18, Warner Losh wrote: > > From: Kyle Evans > > > > do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID > > so we can intercept the special ones. Do that and call the common wrapper > > do_freebsd_sysc

Re: [PATCH 8/9] bsd-user: implement sysctlbyname(2)

2023-02-11 Thread Richard Henderson
On 2/10/23 13:18, Warner Losh wrote: From: Kyle Evans do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID so we can intercept the special ones. Do that and call the common wrapper do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/

[PATCH 8/9] bsd-user: implement sysctlbyname(2)

2023-02-10 Thread Warner Losh
From: Kyle Evans do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID so we can intercept the special ones. Do that and call the common wrapper do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 58 ++