mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Add support for a variadic ioctl() function. The ioctl() interface is a non-standard, Unix interface. NuttX has always used the older, three-parameter version. Most contemporary systems now, however, use a variadic form of the ioctl() function. Added an option to insert a shim layer to adapt the three-parameter ioctl() to use the variadic interface form. Internally, the ioctl handling is the same three-parameter logic. The only real complexity to the shim is in how the system calls must be handled.
This commit is contained in:
@@ -229,7 +229,11 @@
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
# define SYS_close (__SYS_descriptors+0)
|
||||
# define SYS_ioctl (__SYS_descriptors+1)
|
||||
# ifdef CONFIG_LIBC_IOCTL_VARIADIC
|
||||
# define SYS_fs_ioctl (__SYS_descriptors+1)
|
||||
# else
|
||||
# define SYS_ioctl (__SYS_descriptors+1)
|
||||
# endif
|
||||
# define SYS_read (__SYS_descriptors+2)
|
||||
# define SYS_write (__SYS_descriptors+3)
|
||||
# define SYS_pread (__SYS_descriptors+4)
|
||||
|
||||
Reference in New Issue
Block a user