diff options
Diffstat (limited to 'nuttx/fs/fs_fdopen.c')
-rw-r--r-- | nuttx/fs/fs_fdopen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c index 329e4dd84..176ba1bf4 100644 --- a/nuttx/fs/fs_fdopen.c +++ b/nuttx/fs/fs_fdopen.c @@ -159,12 +159,12 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) */ #if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 - ret = net_checksd; + ret = net_checksd(tcb, fd, oflags); #else /* No networking... it is just a bad descriptor */ err = EBADF; - return ERROR; + goto errout; #endif } @@ -244,6 +244,10 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) } } + /* No free stream available.. report ENFILE */ + + err = ENFILE; + #if CONFIG_STDIO_BUFFER_SIZE > 0 errout_with_sem: #endif |