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 2022/04/01 02:37:10 UTC

[GitHub] [incubator-nuttx] XinStellaris opened a new pull request #5924: fs and unistd: increase OPEN_MAX by claiming a Kconfig.

XinStellaris opened a new pull request #5924:
URL: https://github.com/apache/incubator-nuttx/pull/5924


   Signed-off-by: 田昕 <ti...@xiaomi.com>
   
   ## Summary
   OPEN_MAX is too smal, we should increase it. 
   We can refer to linux(man sysconf, you will see), it is defined as no less than _POSIX_OPEN_MAX.
   ## Impact
   sysconf() and files_extend()
   ## Testing
   Vela tested.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5924: fs and unistd: increase OPEN_MAX by claiming a Kconfig.

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5924:
URL: https://github.com/apache/incubator-nuttx/pull/5924#discussion_r840247674



##########
File path: include/limits.h
##########
@@ -203,7 +203,7 @@
 #define NAME_MAX       _POSIX_NAME_MAX
 #define TTY_NAME_MAX   _POSIX_NAME_MAX
 #define NGROUPS_MAX    _POSIX_NGROUPS_MAX
-#define OPEN_MAX       _POSIX_OPEN_MAX
+#define OPEN_MAX       CONFIG_OPEN_MAX

Review comment:
       ```suggestion
   #if CONFIG_OPEN_MAX < _POSIX_OPEN_MAX
   #  define OPEN_MAX     _POSIX_OPEN_MAX
   #else
   #  define OPEN_MAX     CONFIG_OPEN_MAX
   #endif
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] pkarashchenko merged pull request #5924: fs and unistd: increase OPEN_MAX by claiming a Kconfig.

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged pull request #5924:
URL: https://github.com/apache/incubator-nuttx/pull/5924


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5924: fs and unistd: increase OPEN_MAX by claiming a Kconfig.

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5924:
URL: https://github.com/apache/incubator-nuttx/pull/5924#discussion_r840246965



##########
File path: fs/inode/fs_files.c
##########
@@ -71,7 +71,7 @@ static int files_extend(FAR struct filelist *list, size_t row)
       return 0;
     }
 
-  if (row * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK > _POSIX_OPEN_MAX)
+  if (row * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK > OPEN_MAX)

Review comment:
       so we come back to `OPEN_MAX` at the end :) That is good.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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