More improvements to the minimal NSH when there is no file system and when print fieldwidths are suppressed

This commit is contained in:
Gregory Nutt
2013-10-01 11:52:35 -06:00
parent 749eb6a027
commit f6e948fa04
4 changed files with 38 additions and 4 deletions

View File

@@ -87,9 +87,15 @@ int cmd_free(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
(void)mallinfo(&mem);
#endif
#ifdef CONFIG_NOPRINTF_FIELDWIDTH
nsh_output(vtbl, "\ttotal\tused\tfree\tlargest\n");
nsh_output(vtbl, "Mem:\t%d\t%d\t%d\t%d\n",
mem.arena, mem.uordblks, mem.fordblks, mem.mxordblk);
#else
nsh_output(vtbl, " total used free largest\n");
nsh_output(vtbl, "Mem: %11d%11d%11d%11d\n",
mem.arena, mem.uordblks, mem.fordblks, mem.mxordblk);
#endif
return OK;
}