This is an automated email from the ASF dual-hosted git repository. archer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8df223a1efe588e282efc825a2fa8e8b0e1bae08 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Fri Sep 16 14:33:09 2022 +0800 libc: Add LIBC prefix to MEM_FD_VFS_PATH Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- libs/libc/misc/Kconfig | 2 +- libs/libc/misc/lib_memfd.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/libc/misc/Kconfig b/libs/libc/misc/Kconfig index 99b13f75fd..4a7635e533 100644 --- a/libs/libc/misc/Kconfig +++ b/libs/libc/misc/Kconfig @@ -62,7 +62,7 @@ config LIBC_ENVPATH Use the contents of the common environment variable to locate executable or library files. Default: n -config MEM_FD_VFS_PATH +config LIBC_MEM_FD_VFS_PATH string "Relative path to memfd storage" default "memfd" depends on FS_TMPFS diff --git a/libs/libc/misc/lib_memfd.c b/libs/libc/misc/lib_memfd.c index 1f05fe5ea8..8675d33e43 100644 --- a/libs/libc/misc/lib_memfd.c +++ b/libs/libc/misc/lib_memfd.c @@ -31,7 +31,8 @@ * Pre-processor Definitions ****************************************************************************/ -#define MEM_FD_VFS_PATH CONFIG_LIBC_TMPDIR "/" CONFIG_MEM_FD_VFS_PATH "/%s" +#define LIBC_MEM_FD_VFS_PATH \ + CONFIG_LIBC_TMPDIR "/" CONFIG_LIBC_MEM_FD_VFS_PATH "/%s" /**************************************************************************** * Public Functions @@ -42,7 +43,7 @@ int memfd_create(FAR const char *name, unsigned int flags) #ifdef CONFIG_FS_TMPFS char path[PATH_MAX]; - snprintf(path, sizeof(path), MEM_FD_VFS_PATH, name); + snprintf(path, sizeof(path), LIBC_MEM_FD_VFS_PATH, name); return open(path, O_RDWR | flags); #else set_errno(ENOSYS);