procfsproc:Optimize fd information output format
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
e3c637baf4
commit
9381e929dd
|
@ -1203,7 +1203,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
|
|||
totalsize = 0;
|
||||
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||
"\n%-3s %-8s %-8s %-8s %s \n",
|
||||
"\n%-3s %-9s %-7s %-4s %s \n",
|
||||
"FD", "POS", "OFLAGS", "TYPE", "PATH");
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
|
||||
&offset);
|
||||
|
@ -1235,7 +1235,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
|
|||
}
|
||||
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||
"%3d %8ld %8d %8x",
|
||||
"%-3d %-9ld %-7d %4x",
|
||||
i * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK +
|
||||
j, (long)file->f_pos,
|
||||
INODE_GET_TYPE(file->f_inode),
|
||||
|
@ -1266,7 +1266,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
|
|||
|
||||
#ifdef CONFIG_NET
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||
"\n%-3s %-2s %-3s %s\n",
|
||||
"\n%-3s %-5s %s %s\n",
|
||||
"SD", "RF", "TYP", "FLAGS");
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
|
||||
&offset);
|
||||
|
@ -1295,7 +1295,7 @@ static ssize_t proc_groupfd(FAR struct proc_file_s *procfile,
|
|||
FAR struct socket *socket = file->f_priv;
|
||||
FAR struct socket_conn_s *conn = socket->s_conn;
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||
"%3d %3d %02x",
|
||||
"%-3d %-5d %02x\n",
|
||||
i * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK +
|
||||
j, socket->s_type, conn->s_flags);
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
||||
|
|
Loading…
Reference in New Issue