1
0
Fork 0
forked from nuttx/nuttx-update

net/local: rename NET_LOCAL_VFS_PATH to follow linux

And skip same prefix for unix path

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2022-12-30 14:37:24 +08:00 committed by Xiang Xiao
parent 779a610ca3
commit 31134719e7
2 changed files with 6 additions and 1 deletions

View file

@ -17,7 +17,7 @@ if NET_LOCAL
config NET_LOCAL_VFS_PATH
string "Path prefix to Unix domain sockets"
default "/var/socket"
default "/var/run"
---help---
The path prefix to where Unix domain sockets will exist in the VFS namespace.

View file

@ -66,6 +66,11 @@
static void local_format_name(FAR const char *inpath, FAR char *outpath,
FAR const char *suffix, int32_t id)
{
if (strcmp(inpath, CONFIG_NET_LOCAL_VFS_PATH) == 0)
{
inpath += strlen(CONFIG_NET_LOCAL_VFS_PATH);
}
if (id < 0)
{
snprintf(outpath, LOCAL_FULLPATH_LEN - 1,