Define SCTL_MASK32 when COMPAT_FREEBSD32 is defined.

Remove the list of architectures and depend on COMPAT_FREEBSD32 which is
defined (if relevent) in opt_global.h and thus defined everywhere in
the kernel.

This is a minor change in behavior in that 32-bit compat for sysctls now
depends on COMPAT_FREEBSD32 rather than on the potential for 32-bit
compat support. The prior arrangement may have been part of an attempt
to allow 32-bit compat to be loadable, but such attempts are doomed to
failure (due to the fact that ioctls have no meaning without the
associated file descriptor) without vastly more refactoring and some
sort of COMPAT_FREEBSD32_SUPPORT option.

Reviewed by:	jhb
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23748
This commit is contained in:
Brooks Davis 2020-02-28 21:13:15 +00:00
parent c92671e108
commit 4ec9d1370f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358449

View File

@ -156,8 +156,7 @@ struct ctlname {
#define REQ_WIRED 2
/* definitions for sysctl_req 'flags' member */
#if defined(__aarch64__) || defined(__amd64__) || defined(__powerpc64__) ||\
(defined(__mips__) && defined(__mips_n64))
#ifdef COMPAT_FREEBSD32
#define SCTL_MASK32 1 /* 32 bit emulation */
#endif