mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +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:
committed by
Xiang Xiao
parent
7e8003cba1
commit
585b1fc113
+2
-1
@@ -177,7 +177,8 @@ static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
|||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(mq_name) > NAME_MAX)
|
if (sizeof(CONFIG_FS_MQUEUE_MPATH) + 1 + strlen(mq_name)
|
||||||
|
>= MAX_MQUEUE_PATH)
|
||||||
{
|
{
|
||||||
ret = -ENAMETOOLONG;
|
ret = -ENAMETOOLONG;
|
||||||
goto errout;
|
goto errout;
|
||||||
|
|||||||
+1
-1
@@ -39,6 +39,6 @@
|
|||||||
|
|
||||||
/* Sizes of things */
|
/* Sizes of things */
|
||||||
|
|
||||||
#define MAX_MQUEUE_PATH (sizeof(CONFIG_FS_MQUEUE_MPATH) + NAME_MAX)
|
#define MAX_MQUEUE_PATH 64
|
||||||
|
|
||||||
#endif /* __FS_MQUEUE_MQUEUE_H */
|
#endif /* __FS_MQUEUE_MQUEUE_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user