diff options
author | Mark Wong <markwkm@gmail.com> | 2009-03-03 20:09:51 -0800 |
---|---|---|
committer | Mark Wong <markwkm@gmail.com> | 2009-03-03 20:09:51 -0800 |
commit | 843fddfd2484dc9353c50432cccc1e4a77015794 (patch) | |
tree | a75df6d9ccf99ff4feee8970f4a6ce37f890db84 /commands.c | |
parent | 26f15d8dd5193af6ff23c5b8a55a8b1865b6484c (diff) |
Added the ability to sort i/o statistics. Since this was initially
developed for Linux, there will be compiler errors for the other
platforms because of changes to parameters passed in a function call.
That will need to be fixed.
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -241,6 +241,7 @@ show_help(struct statics * stp) { static char *fullhelp; char *p = NULL; + char *q = NULL; if (fullhelp == NULL) { @@ -253,8 +254,17 @@ show_help(struct statics * stp) { p = "not supported"; } - fullhelp = (char *) malloc(strlen(help_text) + strlen(p) + 2); - sprintf(fullhelp, help_text, p); + if (stp->order_names != NULL) + { + q = string_list(stp->order_names_io); + } + if (q == NULL) + { + q = "not supported"; + } + fullhelp = (char *) malloc(strlen(help_text) + strlen(p) + strlen(q) + + 2); + sprintf(fullhelp, help_text, p, q); } display_pager("Top version "); |