mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
mqueue: Rename FS_MQUEUE_MPATH to FS_MQUEUE_VFS_PATH
align with other similiar config which suffix with _VFS_PATH Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
ea4a276eb0
commit
938a995c92
3 changed files with 7 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
if !DISABLE_MQUEUE
|
||||
|
||||
config FS_MQUEUE_MPATH
|
||||
config FS_MQUEUE_VFS_PATH
|
||||
string "Path to message queue"
|
||||
default "/var/mqueue"
|
||||
---help---
|
||||
|
|
|
@ -177,7 +177,7 @@ static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
|||
goto errout;
|
||||
}
|
||||
|
||||
if (sizeof(CONFIG_FS_MQUEUE_MPATH) + 1 + strlen(mq_name)
|
||||
if (sizeof(CONFIG_FS_MQUEUE_VFS_PATH) + 1 + strlen(mq_name)
|
||||
>= MAX_MQUEUE_PATH)
|
||||
{
|
||||
ret = -ENAMETOOLONG;
|
||||
|
@ -199,7 +199,7 @@ static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
|||
mode &= ~umask;
|
||||
|
||||
/* Skip over any leading '/'. All message queue paths are relative to
|
||||
* CONFIG_FS_MQUEUE_MPATH.
|
||||
* CONFIG_FS_MQUEUE_VFS_PATH.
|
||||
*/
|
||||
|
||||
while (*mq_name == '/')
|
||||
|
@ -209,7 +209,8 @@ static int file_mq_vopen(FAR struct file *mq, FAR const char *mq_name,
|
|||
|
||||
/* Get the full path to the message queue */
|
||||
|
||||
snprintf(fullpath, MAX_MQUEUE_PATH, CONFIG_FS_MQUEUE_MPATH "/%s", mq_name);
|
||||
snprintf(fullpath, MAX_MQUEUE_PATH,
|
||||
CONFIG_FS_MQUEUE_VFS_PATH "/%s", mq_name);
|
||||
|
||||
/* Make sure that the check for the existence of the message queue
|
||||
* and the creation of the message queue are atomic with respect to
|
||||
|
|
|
@ -105,7 +105,8 @@ int file_mq_unlink(FAR const char *mq_name)
|
|||
|
||||
/* Get the full path to the message queue */
|
||||
|
||||
snprintf(fullpath, MAX_MQUEUE_PATH, CONFIG_FS_MQUEUE_MPATH "/%s", mq_name);
|
||||
snprintf(fullpath, MAX_MQUEUE_PATH,
|
||||
CONFIG_FS_MQUEUE_VFS_PATH "/%s", mq_name);
|
||||
|
||||
/* Get the inode for this message queue. */
|
||||
|
||||
|
|
Loading…
Reference in a new issue