mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
pipe: Add DEV_PIPE_VFS_PATH to specify the pipe location
and put into /var/pipe by default like other pseudo device Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
91c331f3fd
commit
01a234bfb1
@@ -34,4 +34,10 @@ config DEV_FIFO_SIZE
|
|||||||
Sets the default size of the FIFO ringbuffer in bytes. A value of
|
Sets the default size of the FIFO ringbuffer in bytes. A value of
|
||||||
zero disables FIFO support.
|
zero disables FIFO support.
|
||||||
|
|
||||||
|
config DEV_PIPE_VFS_PATH
|
||||||
|
string "Path to the pipe device"
|
||||||
|
default "/var/pipe"
|
||||||
|
---help---
|
||||||
|
The path to where pipe device will exist in the VFS namespace.
|
||||||
|
|
||||||
endif # PIPES
|
endif # PIPES
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ static int pipe_register(size_t bufsize, int flags,
|
|||||||
|
|
||||||
/* Create a pathname to the pipe device */
|
/* Create a pathname to the pipe device */
|
||||||
|
|
||||||
snprintf(devname, namesize, "/dev/pipe%d", pipeno);
|
snprintf(devname, namesize, CONFIG_DEV_PIPE_VFS_PATH"/%d", pipeno);
|
||||||
|
|
||||||
/* Check if the pipe device has already been created */
|
/* Check if the pipe device has already been created */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user