You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/02 20:15:51 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2639: fs: Let files_allocate return -EMFILE instead ERROR

Ouss4 commented on a change in pull request #2639:
URL: https://github.com/apache/incubator-nuttx/pull/2639#discussion_r550916990



##########
File path: fs/vfs/fs_dupfd.c
##########
@@ -73,7 +73,7 @@ int file_dup(FAR struct file *filep, int minfd)
   fd2 = files_allocate(NULL, 0, 0, minfd);
   if (fd2 < 0)
     {
-      return -EMFILE;
+      return fd2;

Review comment:
       does `files_allocate` return `EMFILE` somehow?
   The return of `file_dup` is the value that we gonna set `errno` to.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org