profs: Print StackAlloc by procfs_snprintf
since snprintf return the wrong number in case of insufficient buffer Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
e5c278981a
commit
7ef29ecce6
|
@ -894,7 +894,7 @@ static ssize_t proc_stack(FAR struct proc_file_s *procfile,
|
|||
|
||||
/* Show the stack alloc address */
|
||||
|
||||
linesize = snprintf(procfile->line, STATUS_LINELEN, "%-12s%p\n",
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%-12s%p\n",
|
||||
"StackAlloc:", tcb->stack_alloc_ptr);
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
|
||||
&offset);
|
||||
|
@ -1010,7 +1010,7 @@ static ssize_t proc_groupstatus(FAR struct proc_file_s *procfile,
|
|||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%-12s%d\n",
|
||||
"Members:", group->tg_nmembers);
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
||||
remaining, &offset);
|
||||
remaining, &offset);
|
||||
|
||||
totalsize += copysize;
|
||||
buffer += copysize;
|
||||
|
|
Loading…
Reference in New Issue