procfs: fix cat status error when meet long thread name
nsh> cat /proc/3/status Name: init123456789987654Type: Task Group: 3 State: Running Change-Id: Iddef8fa1fe3a02d407244f46fa05e3f35dd7c84e Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
2c775bb0c9
commit
dbdb24e2e0
|
@ -459,8 +459,8 @@ static ssize_t proc_status(FAR struct proc_file_s *procfile,
|
||||||
#else
|
#else
|
||||||
name = "<noname>";
|
name = "<noname>";
|
||||||
#endif
|
#endif
|
||||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%-12s%s\n",
|
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||||
"Name:", name);
|
"%-12s%.18s\n", "Name:", name);
|
||||||
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
|
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
|
||||||
&offset);
|
&offset);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue