fs: Remove all LIBC_IOCTL_VARIADIC related stuff

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-05-04 17:00:51 +08:00
committed by patacongo
parent 19cc84ed4a
commit 6604cdb3f2
14 changed files with 103 additions and 272 deletions
+7 -38
View File
@@ -1220,7 +1220,7 @@ int file_truncate(FAR struct file *filep, off_t length);
#endif
/****************************************************************************
* Name: file_ioctl
* Name: file_ioctl and file_vioctl
*
* Description:
* Perform device specific operations.
@@ -1228,7 +1228,7 @@ int file_truncate(FAR struct file *filep, off_t length);
* Input Parameters:
* file File structure instance
* req The ioctl command
* arg The argument of the ioctl cmd
* ap The argument of the ioctl cmd
*
* Returned Value:
* Returns a non-negative number on success; A negated errno value is
@@ -1237,10 +1237,11 @@ int file_truncate(FAR struct file *filep, off_t length);
*
****************************************************************************/
int file_ioctl(FAR struct file *filep, int req, unsigned long arg);
int file_vioctl(FAR struct file *filep, int req, va_list ap);
int file_ioctl(FAR struct file *filep, int req, ...);
/****************************************************************************
* Name: nx_ioctl
* Name: nx_ioctl and nx_vioctl
*
* Description:
* nx_ioctl() is similar to the standard 'ioctl' interface except that is
@@ -1256,40 +1257,8 @@ int file_ioctl(FAR struct file *filep, int req, unsigned long arg);
*
****************************************************************************/
int nx_ioctl(int fd, int req, unsigned long arg);
/****************************************************************************
* Name: fs_ioctl
*
* Description:
* Perform device specific operations.
*
* Input Parameters:
* fd File/socket descriptor of device
* req The ioctl command
* arg The argument of the ioctl cmd
*
* Returned Value:
* >=0 on success (positive non-zero values are cmd-specific)
* -1 on failure with errno set properly:
*
* EBADF
* 'fd' is not a valid descriptor.
* EFAULT
* 'arg' references an inaccessible memory area.
* EINVAL
* 'cmd' or 'arg' is not valid.
* ENOTTY
* 'fd' is not associated with a character special device.
* ENOTTY
* The specified request does not apply to the kind of object that the
* descriptor 'fd' references.
*
****************************************************************************/
#ifdef CONFIG_LIBC_IOCTL_VARIADIC
int fs_ioctl(int fd, int req, unsigned long arg);
#endif
int nx_vioctl(int fd, int req, va_list ap);
int nx_ioctl(int fd, int req, ...);
/****************************************************************************
* Name: file_vfcntl
+7 -6
View File
@@ -1228,7 +1228,7 @@ int psock_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
FAR socklen_t *addrlen);
/****************************************************************************
* Name: psock_ioctl
* Name: psock_ioctl and psock_vioctl
*
* Description:
* Perform network device specific operations.
@@ -1236,7 +1236,7 @@ int psock_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
* Input Parameters:
* psock A pointer to a NuttX-specific, internal socket structure
* cmd The ioctl command
* arg The argument of the ioctl cmd
* ap The argument of the ioctl cmd
*
* Returned Value:
* A non-negative value is returned on success; a negated errno value is
@@ -1258,10 +1258,11 @@ int psock_getpeername(FAR struct socket *psock, FAR struct sockaddr *addr,
*
****************************************************************************/
int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg);
int psock_vioctl(FAR struct socket *psock, int cmd, va_list ap);
int psock_ioctl(FAR struct socket *psock, int cmd, ...);
/****************************************************************************
* Name: netdev_ioctl
* Name: netdev_vioctl
*
* Description:
* Perform network device specific operations.
@@ -1269,7 +1270,7 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg);
* Input Parameters:
* sockfd Socket descriptor of device
* cmd The ioctl command
* arg The argument of the ioctl cmd
* ap The argument of the ioctl cmd
*
* Returned Value:
* A non-negative value is returned on success; a negated errno value is
@@ -1291,7 +1292,7 @@ int psock_ioctl(FAR struct socket *psock, int cmd, unsigned long arg);
*
****************************************************************************/
int netdev_ioctl(int sockfd, int cmd, unsigned long arg);
int netdev_vioctl(int sockfd, int cmd, va_list ap);
/****************************************************************************
* Name: psock_poll
-4
View File
@@ -126,11 +126,7 @@ extern "C"
*
****************************************************************************/
#ifdef CONFIG_LIBC_IOCTL_VARIADIC
int ioctl(int fd, int req, ...);
#else
int ioctl(int fd, int req, unsigned long arg);
#endif
#undef EXTERN
#if defined(__cplusplus)
+1 -7
View File
@@ -284,13 +284,7 @@
*/
#define SYS_close (__SYS_descriptors + 0)
#ifdef CONFIG_LIBC_IOCTL_VARIADIC
# define SYS_fs_ioctl (__SYS_descriptors + 1)
#else
# define SYS_ioctl (__SYS_descriptors + 1)
#endif
#define SYS_ioctl (__SYS_descriptors + 1)
#define SYS_read (__SYS_descriptors + 2)
#define SYS_write (__SYS_descriptors + 3)
#define SYS_pread (__SYS_descriptors + 4)