From 31134719e7bb15ec478218170075a76239e07c01 Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Fri, 30 Dec 2022 14:37:24 +0800 Subject: [PATCH] net/local: rename NET_LOCAL_VFS_PATH to follow linux And skip same prefix for unix path Signed-off-by: dongjiuzhu1 --- net/local/Kconfig | 2 +- net/local/local_fifo.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/net/local/Kconfig b/net/local/Kconfig index 7de32d905f..43c8aeb436 100644 --- a/net/local/Kconfig +++ b/net/local/Kconfig @@ -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. diff --git a/net/local/local_fifo.c b/net/local/local_fifo.c index 9de6eae68b..22e72958ec 100644 --- a/net/local/local_fifo.c +++ b/net/local/local_fifo.c @@ -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,