From e3c637baf4876425ec34e37b5b238b049fd1f62f Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Wed, 7 Jun 2023 21:57:30 +0800 Subject: [PATCH] fs: procfs add show file typee Signed-off-by: yinshengkai --- fs/procfs/fs_procfsproc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index 81decce25b..e7344a02c0 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -1203,8 +1203,8 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile, totalsize = 0; linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, - "\n%-3s %-8s %-8s %s\n", - "FD", "POS", "OFLAGS", "PATH"); + "\n%-3s %-8s %-8s %-8s %s \n", + "FD", "POS", "OFLAGS", "TYPE", "PATH"); copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset); @@ -1235,9 +1235,10 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile, } linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, - "%3d %8ld %8x", + "%3d %8ld %8d %8x", i * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK + j, (long)file->f_pos, + INODE_GET_TYPE(file->f_inode), file->f_oflags); copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset);