mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Add fcntl(F_DUPFD)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1995 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+2
-8
@@ -344,15 +344,9 @@ EXTERN int files_dup(FAR struct file *filep1, FAR struct file *filep2);
|
||||
|
||||
/* fs_filedup.c **************************************************************/
|
||||
|
||||
/* This alternative naming is used when dup could operate on both file and
|
||||
* socket descritors to avoid drawing unused socket support into the link.
|
||||
*/
|
||||
/* Dupicate a file descriptor using any value greater than or equal to minfd */
|
||||
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
EXTERN int file_dup(int fd);
|
||||
#else
|
||||
# define file_dup(fd) dup(fd)
|
||||
#endif
|
||||
EXTERN int file_dup(int fd, int minfd);
|
||||
|
||||
/* fs_filedup2.c *************************************************************/
|
||||
|
||||
|
||||
+2
-6
@@ -166,14 +166,10 @@ EXTERN int net_poll(int sockfd, struct pollfd *fds, boolean setup);
|
||||
|
||||
/* net_dup.c *****************************************************************/
|
||||
/* The standard dup() operation redirects operations on socket descriptors to
|
||||
* this function (when both file and socket descriptors are supported)
|
||||
* this function
|
||||
*/
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTOR > 0
|
||||
EXTERN int net_dup(int sockfd);
|
||||
#else
|
||||
# define net_dup(sockfd) dup(sockfd)
|
||||
#endif
|
||||
EXTERN int net_dup(int sockfd, int minsd);
|
||||
|
||||
/* net_dup2.c ****************************************************************/
|
||||
/* The standard dup2() operation redirects operations on socket descriptors to
|
||||
|
||||
Reference in New Issue
Block a user