[PATCH 00/17] bsd-user: upstream ioctl

Warner Losh posted 17 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260412-ioctl-v1-0-1d998a460560@bsdimp.com
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>
There is a newer version of this series
bsd-user/bsd-ioctl.c                  | 438 ++++++++++++++++++++++++++++++++++
bsd-user/bsd-ioctl.h                  |  14 ++
bsd-user/freebsd/os-ioctl-cmds.h      | 151 ++++++++++++
bsd-user/freebsd/os-ioctl-cryptodev.h |  74 ++++++
bsd-user/freebsd/os-ioctl-disk.h      |  41 ++++
bsd-user/freebsd/os-ioctl-filio.h     |  34 +++
bsd-user/freebsd/os-ioctl-in6_var.h   | 217 +++++++++++++++++
bsd-user/freebsd/os-ioctl-sockio.h    | 240 +++++++++++++++++++
bsd-user/freebsd/os-ioctl-ttycom.h    | 237 ++++++++++++++++++
bsd-user/freebsd/os-ioctl-types.h     | 104 ++++++++
bsd-user/syscall_defs.h               |  10 +
11 files changed, 1560 insertions(+)
[PATCH 00/17] bsd-user: upstream ioctl
Posted by Warner Losh 1 month, 2 weeks ago
Again with the help of claude, harvest the ioctl changes from
bsd-user blitz branch. These are a bit messy, since ioctls tend
to be a bit messy. Ideally, all this would be generated, but
that code isn't ready yet, so we go with what we have.

Please note: All style complaints are false positives. The > 80
character ones are fine: these files are semi-generated from upstream
and fixing them makes syncing harder. Harder syncing in code that's
basically boilerplate is worse than lines that are too long for
definitions people are never going to read.

The two errors:
● b64902a56387: bsd-user: Add bsd-ioctl.c infrastructure and termios conversion
  ● checkpatch.pl: 197: ERROR: Macros with complex values should be enclosed in parenthesis
  ● checkpatch.pl: 198: ERROR: Macros with complex values should be enclosed in parenthesis
are impossible to fix: they are what they need to be for the macro
tricks that are being used. One cannot add parenthesis and have correct
code.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
Stacey D. Son (10):
      bsd-user: Add FreeBSD tty ioctl definitions
      bsd-user: Add FreeBSD file I/O ioctl definitions
      bsd-user: Add FreeBSD socket ioctl definitions
      bsd-user: Add FreeBSD cryptodev ioctl definitions
      bsd-user: Add FreeBSD disk ioctl definitions
      bsd-user: Add FreeBSD IPv6 ioctl definitions
      bsd-user: Add FreeBSD ioctl type definitions
      bsd-user: Add FreeBSD ioctl command table
      bsd-user: Add bsd-ioctl.h header
      bsd-user: Add target_sockaddr and safe_ioctl to syscall_defs.h

Warner Losh (7):
      bsd-user: Add bsd-ioctl.c infrastructure and termios conversion
      bsd-user: Add log_unsupported_ioctl function
      bsd-user: Add do_ioctl_unsupported function
      bsd-user: Add target_to_host_sockaddr_in6 function
      bsd-user: Add do_ioctl_in6_ifreq_sockaddr_int function
      bsd-user: Add do_bsd_ioctl main function
      bsd-user: Add init_bsd_ioctl function

 bsd-user/bsd-ioctl.c                  | 438 ++++++++++++++++++++++++++++++++++
 bsd-user/bsd-ioctl.h                  |  14 ++
 bsd-user/freebsd/os-ioctl-cmds.h      | 151 ++++++++++++
 bsd-user/freebsd/os-ioctl-cryptodev.h |  74 ++++++
 bsd-user/freebsd/os-ioctl-disk.h      |  41 ++++
 bsd-user/freebsd/os-ioctl-filio.h     |  34 +++
 bsd-user/freebsd/os-ioctl-in6_var.h   | 217 +++++++++++++++++
 bsd-user/freebsd/os-ioctl-sockio.h    | 240 +++++++++++++++++++
 bsd-user/freebsd/os-ioctl-ttycom.h    | 237 ++++++++++++++++++
 bsd-user/freebsd/os-ioctl-types.h     | 104 ++++++++
 bsd-user/syscall_defs.h               |  10 +
 11 files changed, 1560 insertions(+)
---
base-commit: becd22fdc2a071783d9e04421526633772b3b98c
change-id: 20260411-ioctl-68c80a77ad32
prerequisite-change-id: 20260312-share-thunk-ab1585477999:v2
prerequisite-patch-id: a048e442d9dda7ee4ed1070ef5eb524e078b9a3b

Best regards,
-- 
Warner Losh <imp@bsdimp.com>