From 5b1486f9cea5ad5ecde4aa3b3f704aad23476f91 Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Mon, 26 Feb 2024 18:15:27 +0800 Subject: [PATCH] fs/procfs: add build config to /proc/version Currently at runtime it is hard to know the exact build config of the current NuttX instance. Thus it is inconvenient when there are multiple configs for the same board. This patch attempts to solve the issue by adding build config to /proc/version. Signed-off-by: Yanfeng Liu --- fs/procfs/fs_procfsversion.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/procfs/fs_procfsversion.c b/fs/procfs/fs_procfsversion.c index dabd0be5f6..cb182818b4 100644 --- a/fs/procfs/fs_procfsversion.c +++ b/fs/procfs/fs_procfsversion.c @@ -201,8 +201,9 @@ static ssize_t version_read(FAR struct file *filep, FAR char *buffer, { uname(&name); linesize = procfs_snprintf(attr->line, VERSION_LINELEN, - "%s version %s %s\n", - name.sysname, name.release, name.version); + "%s version %s %s %s\n", + name.sysname, name.release, name.version, + CONFIG_BASE_DEFCONFIG); /* Save the linesize in case we are re-entered with f_pos > 0 */