This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 2424b12857 fs/procfs: fix output format of fd info 2424b12857 is described below commit 2424b1285742806496c17a9eef4c68e7172f717c Author: wangjianyu3 <wangjian...@xiaomi.com> AuthorDate: Mon Jun 23 17:00:07 2025 +0800 fs/procfs: fix output format of fd info Refered to PRINTF(3), the [v]snprintf returns the number of characters printed (excluding the null byte used to end output to strings). Signed-off-by: wangjianyu3 <wangjian...@xiaomi.com> --- fs/procfs/fs_procfsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index 94f3035770..cfdebd9d59 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -1330,7 +1330,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile, fdp->f_backtrace, CONFIG_FS_BACKTRACE); #endif - procfile->line[linesize - 2] = '\n'; + procfile->line[linesize - 1] = '\n'; } file_put(filep);