The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fd313924563917857e3567a62e405252cf2bafaf
commit fd313924563917857e3567a62e405252cf2bafaf Author: Mark Johnston <ma...@freebsd.org> AuthorDate: 2024-11-19 22:40:08 +0000 Commit: Mark Johnston <ma...@freebsd.org> CommitDate: 2024-12-03 01:02:21 +0000 kevent: Use designated array indices to initialize the sysfilt_ops table This makes it a bit easier to see where operations on a particular filter are defined. No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay (cherry picked from commit f06b747118cb47212bfc178993171007ee7e9424) --- sys/kern/kern_event.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 41295c374e65..fa96fbad20ce 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -346,19 +346,19 @@ static struct { int for_nolock; int for_refcnt; } sysfilt_ops[EVFILT_SYSCOUNT] = { - { &file_filtops, 1 }, /* EVFILT_READ */ - { &file_filtops, 1 }, /* EVFILT_WRITE */ - { &null_filtops }, /* EVFILT_AIO */ - { &file_filtops, 1 }, /* EVFILT_VNODE */ - { &proc_filtops, 1 }, /* EVFILT_PROC */ - { &sig_filtops, 1 }, /* EVFILT_SIGNAL */ - { &timer_filtops, 1 }, /* EVFILT_TIMER */ - { &file_filtops, 1 }, /* EVFILT_PROCDESC */ - { &fs_filtops, 1 }, /* EVFILT_FS */ - { &null_filtops }, /* EVFILT_LIO */ - { &user_filtops, 1 }, /* EVFILT_USER */ - { &null_filtops }, /* EVFILT_SENDFILE */ - { &file_filtops, 1 }, /* EVFILT_EMPTY */ + [~EVFILT_READ] = { &file_filtops, 1 }, + [~EVFILT_WRITE] = { &file_filtops, 1 }, + [~EVFILT_AIO] = { &null_filtops }, + [~EVFILT_VNODE] = { &file_filtops, 1 }, + [~EVFILT_PROC] = { &proc_filtops, 1 }, + [~EVFILT_SIGNAL] = { &sig_filtops, 1 }, + [~EVFILT_TIMER] = { &timer_filtops, 1 }, + [~EVFILT_PROCDESC] = { &file_filtops, 1 }, + [~EVFILT_FS] = { &fs_filtops, 1 }, + [~EVFILT_LIO] = { &null_filtops }, + [~EVFILT_USER] = { &user_filtops, 1 }, + [~EVFILT_SENDFILE] = { &null_filtops }, + [~EVFILT_EMPTY] = { &file_filtops, 1 }, }; /*