FreeBSD has a system call number header, sys/syscall.h, that's installed
on every system that can compile qemu. Generate the system call numbers
from that table rather than re-regenerating it yet again.
To do this, I have to clean up a few stragglers for system calls we've
removed. But these returned not supported anyway, so there's no net
change.
I also tried to do this in a way that the other bsds can coexist with
should they show up again in the future. To that end, I moved the
definition of time_t into os-syscall.h, where I noticed it was wrong for
amd64 targets (which is little used and missing features, so it went
unnoticed for a long time).
More will be generated in the future, but this is the first steps.
Finally, while this does add files, no adjustment to MAINTAINERS is
needed.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
Changes in v2:
- Rebase to tip of master after 11.0 release
- Regenerate strace.list, can't do this at runtime just yet so include script
- Simplified syscall generator meson integration.
- Link to v1: https://lore.kernel.org/qemu-devel/20260413-syscall-nr-v1-0-f70408d042ea@bsdimp.com
---
Warner Losh (5):
bsd-user: Add syscall header generator for FreeBSD
bsd-user: Delete sbrk and sstk system calls.
bsd-user: Create os-syscall.h
bsd-user: Switch to generated syscall_nr.h
bsd-user: Regnerate strace.list
bsd-user/bsd-mem.h | 2 +
bsd-user/freebsd/meson.build | 11 +-
bsd-user/freebsd/os-syscall.c | 8 -
bsd-user/freebsd/os-syscall.h | 21 +
bsd-user/freebsd/scripts/strace.lua | 117 ++++++
bsd-user/freebsd/scripts/syscallhdr.sh | 9 +
bsd-user/freebsd/strace.list | 704 ++++++++++++++++++++-------------
bsd-user/freebsd/syscall_nr.h | 515 ------------------------
bsd-user/syscall_defs.h | 18 +-
9 files changed, 599 insertions(+), 806 deletions(-)
---
base-commit: 759c456b1d22fe4083c8b384da27d3f56fd53f82
change-id: 20260412-syscall-nr-a0a831fce9a0
Best regards,
--
Warner Losh <imp@bsdimp.com>