git: 7aeec4eea852 - stable/13 - sysent: Get rid of bogus sys/sysent.h include.

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Fri, 17 Jun 2022 19:41:04 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=7aeec4eea8523210598152bd21bc0d8ccea9a97d

commit 7aeec4eea8523210598152bd21bc0d8ccea9a97d
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-05-28 17:52:17 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:35:31 +0000

    sysent: Get rid of bogus sys/sysent.h include.
    
    Where appropriate hide sysent.h under proper condition.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 31d1b816fe139f46083f8609c34b7d129a6e2ee0)
---
 sys/cam/scsi/scsi_cd.c                 | 1 -
 sys/compat/freebsd32/freebsd32_ioctl.c | 1 -
 sys/fs/nfsclient/nfs_clsubs.c          | 1 -
 sys/fs/procfs/procfs_dbregs.c          | 2 +-
 sys/fs/procfs/procfs_fpregs.c          | 2 +-
 sys/fs/procfs/procfs_regs.c            | 2 +-
 sys/fs/procfs/procfs_status.c          | 1 -
 sys/kern/kern_acct.c                   | 1 -
 sys/kern/kern_context.c                | 1 -
 sys/kern/kern_environment.c            | 1 -
 sys/kern/kern_ffclock.c                | 1 -
 sys/kern/kern_linker.c                 | 1 -
 sys/kern/kern_prot.c                   | 2 ++
 sys/kern/kern_racct.c                  | 1 -
 sys/kern/kern_rctl.c                   | 1 -
 sys/kern/kern_time.c                   | 1 -
 sys/kern/kern_umtx.c                   | 1 -
 sys/kern/p1003_1b.c                    | 1 -
 sys/kern/tty_pts.c                     | 1 -
 sys/kern/uipc_syscalls.c               | 2 ++
 sys/kern/vfs_acl.c                     | 1 -
 sys/kern/vfs_aio.c                     | 2 +-
 sys/kern/vfs_mount.c                   | 1 -
 sys/kern/vfs_mountroot.c               | 1 -
 sys/kern/vfs_syscalls.c                | 1 -
 sys/netinet/in_jail.c                  | 1 -
 sys/netinet6/in6_jail.c                | 1 -
 sys/security/mac/mac_syscalls.c        | 1 -
 28 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index b9d5d1a76b9c..766e9c99f006 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/proc.h>
 #include <sys/sbuf.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/taskqueue.h>
 #include <geom/geom_disk.h>
 
diff --git a/sys/compat/freebsd32/freebsd32_ioctl.c b/sys/compat/freebsd32/freebsd32_ioctl.c
index b3ed457f7132..789e7a77ba80 100644
--- a/sys/compat/freebsd32/freebsd32_ioctl.c
+++ b/sys/compat/freebsd32/freebsd32_ioctl.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/syscall.h>
 #include <sys/syscallsubr.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/systm.h>
 #include <sys/uio.h>
diff --git a/sys/fs/nfsclient/nfs_clsubs.c b/sys/fs/nfsclient/nfs_clsubs.c
index d361c175aa8e..7d45c213f6d3 100644
--- a/sys/fs/nfsclient/nfs_clsubs.c
+++ b/sys/fs/nfsclient/nfs_clsubs.c
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/malloc.h>
-#include <sys/sysent.h>
 #include <sys/syscall.h>
 #include <sys/sysproto.h>
 #include <sys/taskqueue.h>
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index acc0f7f8c5ac..f7bf2b792625 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -51,13 +51,13 @@
 #include <sys/mutex.h>
 #include <sys/proc.h>
 #include <sys/ptrace.h>
-#include <sys/sysent.h>
 #include <sys/uio.h>
 
 #include <fs/pseudofs/pseudofs.h>
 #include <fs/procfs/procfs.h>
 
 #ifdef COMPAT_FREEBSD32
+#include <sys/sysent.h>
 #include <sys/procfs.h>
 #include <machine/fpu.h>
 
diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c
index 1118eb68dcbc..2d680fe2621d 100644
--- a/sys/fs/procfs/procfs_fpregs.c
+++ b/sys/fs/procfs/procfs_fpregs.c
@@ -45,13 +45,13 @@
 #include <sys/mutex.h>
 #include <sys/proc.h>
 #include <sys/ptrace.h>
-#include <sys/sysent.h>
 #include <sys/uio.h>
 
 #include <fs/pseudofs/pseudofs.h>
 #include <fs/procfs/procfs.h>
 
 #ifdef COMPAT_FREEBSD32
+#include <sys/sysent.h>
 #include <sys/procfs.h>
 #include <machine/fpu.h>
 
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c
index 703dad64a182..fd5d0cb2a209 100644
--- a/sys/fs/procfs/procfs_regs.c
+++ b/sys/fs/procfs/procfs_regs.c
@@ -45,7 +45,6 @@
 #include <sys/mutex.h>
 #include <sys/proc.h>
 #include <sys/ptrace.h>
-#include <sys/sysent.h>
 #include <sys/uio.h>
 
 #include <fs/pseudofs/pseudofs.h>
@@ -53,6 +52,7 @@
 
 #ifdef COMPAT_FREEBSD32
 #include <sys/procfs.h>
+#include <sys/sysent.h>
 #include <machine/fpu.h>
 
 /*
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index e4e7e51ac02a..4592f458058d 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -52,7 +52,6 @@
 #include <sys/proc.h>
 #include <sys/resourcevar.h>
 #include <sys/sbuf.h>
-#include <sys/sysent.h>
 #include <sys/tty.h>
 
 #include <vm/vm.h>
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 2a8d2f892807..447fedeb1537 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sched.h>
 #include <sys/sx.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/syslog.h>
 #include <sys/sysproto.h>
 #include <sys/tty.h>
diff --git a/sys/kern/kern_context.c b/sys/kern/kern_context.c
index 516c54b75852..8612c95ae641 100644
--- a/sys/kern/kern_context.c
+++ b/sys/kern/kern_context.c
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/mutex.h>
 #include <sys/proc.h>
 #include <sys/syscallsubr.h>
-#include <sys/sysent.h>
 #include <sys/systm.h>
 #include <sys/sysproto.h>
 #include <sys/signalvar.h>
diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c
index 2a4c62d64a0f..77fdf833c530 100644
--- a/sys/kern/kern_environment.c
+++ b/sys/kern/kern_environment.c
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/kenv.h>
 #include <sys/kernel.h>
 #include <sys/systm.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/libkern.h>
 #include <sys/kenv.h>
diff --git a/sys/kern/kern_ffclock.c b/sys/kern/kern_ffclock.c
index e76e2b6652f4..0ab8e35fbe02 100644
--- a/sys/kern/kern_ffclock.c
+++ b/sys/kern/kern_ffclock.c
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/priv.h>
 #include <sys/proc.h>
 #include <sys/sbuf.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/sysctl.h>
 #include <sys/systm.h>
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index e3c82ca5f432..1617e4f0d5b4 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sx.h>
 #include <sys/syscallsubr.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/vnode.h>
 
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 341c94cc80aa..9710f6ca1fe0 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -63,7 +63,9 @@ __FBSDID("$FreeBSD$");
 #include <sys/sx.h>
 #include <sys/priv.h>
 #include <sys/proc.h>
+#ifdef COMPAT_43
 #include <sys/sysent.h>
+#endif
 #include <sys/sysproto.h>
 #include <sys/jail.h>
 #include <sys/racct.h>
diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c
index 512e06814c24..94624e88af51 100644
--- a/sys/kern/kern_racct.c
+++ b/sys/kern/kern_racct.c
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/smp.h>
 #include <sys/sx.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/umtxvar.h>
 #include <machine/smp.h>
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c
index 90e2f7832691..f4356f802f0c 100644
--- a/sys/kern/kern_rctl.c
+++ b/sys/kern/kern_rctl.c
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/rctl.h>
 #include <sys/resourcevar.h>
 #include <sys/sx.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/systm.h>
 #include <sys/types.h>
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 18d89f54ca69..aa7060c7cb7f 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sleepqueue.h>
 #include <sys/syscallsubr.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/priv.h>
 #include <sys/proc.h>
 #include <sys/posix4.h>
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index c250d890bf05..f847bd771a84 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sched.h>
 #include <sys/smp.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/systm.h>
 #include <sys/sysproto.h>
 #include <sys/syscallsubr.h>
diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c
index c1f51dd60a7a..0949414bbf00 100644
--- a/sys/kern/p1003_1b.c
+++ b/sys/kern/p1003_1b.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/posix4.h>
 #include <sys/syscallsubr.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/syslog.h>
 #include <sys/sysproto.h>
 
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index dbbf35cf1a12..eaf2f334ebc1 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/syscall.h>
 #include <sys/syscallsubr.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/sysproto.h>
 #include <sys/systm.h>
 #include <sys/tty.h>
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 44079bae1e9b..a5f27f6d3148 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -57,7 +57,9 @@ __FBSDID("$FreeBSD$");
 #include <sys/socket.h>
 #include <sys/socketvar.h>
 #include <sys/syscallsubr.h>
+#ifdef COMPAT_43
 #include <sys/sysent.h>
+#endif
 #include <sys/uio.h>
 #include <sys/un.h>
 #include <sys/unpcb.h>
diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c
index 6bae01bd9d85..596a26f8acea 100644
--- a/sys/kern/vfs_acl.c
+++ b/sys/kern/vfs_acl.c
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/file.h>
 #include <sys/filedesc.h>
 #include <sys/proc.h>
-#include <sys/sysent.h>
 #include <sys/acl.h>
 
 #include <security/audit/audit.h>
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 82fa7990937a..32a31ec80cfb 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/socket.h>
 #include <sys/socketvar.h>
 #include <sys/syscall.h>
-#include <sys/sysent.h>
 #include <sys/sysctl.h>
 #include <sys/syslog.h>
 #include <sys/sx.h>
@@ -2722,6 +2721,7 @@ filt_lio(struct knote *kn, long hint)
 #ifdef COMPAT_FREEBSD32
 #include <sys/mount.h>
 #include <sys/socket.h>
+#include <sys/sysent.h>
 #include <compat/freebsd32/freebsd32.h>
 #include <compat/freebsd32/freebsd32_proto.h>
 #include <compat/freebsd32/freebsd32_signal.h>
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 44c9800ac493..4181502bdea8 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysproto.h>
 #include <sys/sx.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/systm.h>
 #include <sys/vnode.h>
 #include <vm/uma.h>
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index 7e88a58fdb90..1886d3b7aca3 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysproto.h>
 #include <sys/sx.h>
 #include <sys/sysctl.h>
-#include <sys/sysent.h>
 #include <sys/systm.h>
 #include <sys/vnode.h>
 
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index b8f2bf4f695c..64ff9b55c57e 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/buf.h>
 #include <sys/capsicum.h>
 #include <sys/disk.h>
-#include <sys/sysent.h>
 #include <sys/malloc.h>
 #include <sys/mount.h>
 #include <sys/mutex.h>
diff --git a/sys/netinet/in_jail.c b/sys/netinet/in_jail.c
index 11891b56ecbe..3231ca214775 100644
--- a/sys/netinet/in_jail.c
+++ b/sys/netinet/in_jail.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/racct.h>
 #include <sys/refcount.h>
 #include <sys/sx.h>
-#include <sys/sysent.h>
 #include <sys/namei.h>
 #include <sys/mount.h>
 #include <sys/queue.h>
diff --git a/sys/netinet6/in6_jail.c b/sys/netinet6/in6_jail.c
index 65b397f69bf2..0f83344cd668 100644
--- a/sys/netinet6/in6_jail.c
+++ b/sys/netinet6/in6_jail.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/racct.h>
 #include <sys/refcount.h>
 #include <sys/sx.h>
-#include <sys/sysent.h>
 #include <sys/namei.h>
 #include <sys/mount.h>
 #include <sys/queue.h>
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c
index e7d71b2e22da..949421ecb0ab 100644
--- a/sys/security/mac/mac_syscalls.c
+++ b/sys/security/mac/mac_syscalls.c
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 #include <sys/sysctl.h>
 #include <sys/sysproto.h>
-#include <sys/sysent.h>
 #include <sys/vnode.h>
 #include <sys/mount.h>
 #include <sys/file.h>