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:
Gregory Nutt
2014-11-29 10:53:22 -06:00
parent 19d31412f7
commit e31d5125ae
11 changed files with 233 additions and 53 deletions
+5 -1
View File
@@ -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)