mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
fs: mqueue: Change MAX_MQUEUE_PATH to 64
Summary: - This commit changes MAX_MQUEUE_PATH to 64 to reduce stack memory if the NAME_MAX is large Impact: - None Testing: - Tested with spresense:rndis_smp Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
7e8003cba1
commit
585b1fc113
2 changed files with 3 additions and 2 deletions
|
@ -177,7 +177,8 @@ static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
|||
goto errout;
|
||||
}
|
||||
|
||||
if (strlen(mq_name) > NAME_MAX)
|
||||
if (sizeof(CONFIG_FS_MQUEUE_MPATH) + 1 + strlen(mq_name)
|
||||
>= MAX_MQUEUE_PATH)
|
||||
{
|
||||
ret = -ENAMETOOLONG;
|
||||
goto errout;
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
|
||||
/* Sizes of things */
|
||||
|
||||
#define MAX_MQUEUE_PATH (sizeof(CONFIG_FS_MQUEUE_MPATH) + NAME_MAX)
|
||||
#define MAX_MQUEUE_PATH 64
|
||||
|
||||
#endif /* __FS_MQUEUE_MQUEUE_H */
|
||||
|
|
Loading…
Reference in a new issue