Update README; trivial changes to lsmod output format

This commit is contained in:
Gregory Nutt 2015-12-13 10:30:47 -06:00
parent f0a21d3d48
commit a620f99306
2 changed files with 18 additions and 18 deletions

View File

@ -610,14 +610,14 @@ o lsmod
Show information about the currently installed OS modules. This information includes:
- The module name assigned to the module when it was installed (NAME).
- The address of the module initialization function (INIT).
- The address of the module un-initialization function (UNINIT).
- An argument that will be passed to the module un-initialization function (ARG).
- The start of the .text memory region (TEXT).
- The size of the .text memory region size (SIZE).
- The start of the .bss/.data memory region (DATA).
- The size of the .bss/.data memory region size (SIZE).
- The module name assigned to the module when it was installed (NAME, string).
- The address of the module initialization function (INIT, hexadecimal).
- The address of the module un-initialization function (UNINIT, hexadecimal).
- An argument that will be passed to the module un-initialization function (ARG, hexadecimal).
- The start of the .text memory region (TEXT, hexadecimal).
- The size of the .text memory region size (SIZE, decimal).
- The start of the .bss/.data memory region (DATA, hexadecimal).
- The size of the .bss/.data memory region size (SIZE, decimal).
Example:

View File

@ -116,7 +116,7 @@ int cmd_lsmod(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* Output a Header */
nsh_output(vtbl, "%-16s %9s %9s %9s %9s %8s %9s %8s\n",
nsh_output(vtbl, "%-16s %8s %8s %8s %8s %8s %8s %8s\n",
"NAME", "INIT", "UNINIT", "ARG", "TEXT", "SIZE",
"DATA", "SIZE");
@ -138,14 +138,14 @@ int cmd_lsmod(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
*
* "%s,%p,%p,%p,%p,%lu,%p,%lu\n"
*
* 1) Module name string
* 2) Initializer address
* 3) Uninitializer address
* 4) Uninitializer argument
* 5) .text address
* 6) Size of .text
* 7) .bss/.data address
* 8) Size of .bss/.data
* 1) Module name (string)
* 2) Initializer address (hex)
* 3) Uninitializer address (hex)
* 4) Uninitializer argument (hex)
* 5) .text address (hex)
* 6) Size of .text (decimal)
* 7) .bss/.data address (hex)
* 8) Size of .bss/.data (decimal)
*/
modulename = strtok_r(vtbl->iobuffer, ",\n", &lasts);
@ -157,7 +157,7 @@ int cmd_lsmod(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
data = strtok_r(NULL, ",\n", &lasts);
datasize = strtok_r(NULL, ",\n", &lasts);
nsh_output(vtbl, "%-16s %9s %9s %9s %9s %8s %9s %8s\n",
nsh_output(vtbl, "%-16s %8s %8s %8s %8s %8s %8s %8s\n",
modulename,
initializer ? initializer : "",
uninitializer ? uninitializer : "",