diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-05-04 20:58:29 +0200 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-05-04 20:58:29 +0200 |
commit | 3e761dad4cfec0f2dcafb859fb13b8692daf8882 (patch) | |
tree | 5930d7de02a3d8ccd0cd6fda9dc069b0f8e02e2b | |
parent | a88671c995e6f25f46c921e1035a3a68a3a72660 (diff) | |
download | hdt-3e761dad4cfec0f2dcafb859fb13b8692daf8882.tar.gz hdt-3e761dad4cfec0f2dcafb859fb13b8692daf8882.tar.xz hdt-3e761dad4cfec0f2dcafb859fb13b8692daf8882.zip |
hdt: improve help message
Impact: Improve display usage
Prior to that commit, the help message was using too much lines.
This commit make it more compact
-rw-r--r-- | com32/hdt/hdt-cli-hdt.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/com32/hdt/hdt-cli-hdt.c b/com32/hdt/hdt-cli-hdt.c index 8069b190..ab2a1d29 100644 --- a/com32/hdt/hdt-cli-hdt.c +++ b/com32/hdt/hdt-cli-hdt.c @@ -54,9 +54,10 @@ static void main_show_modes(int argc __unused, char** argv __unused, printf("Available modes:\n"); while (list_modes[i]) { - printf("\t%s\n", list_modes[i]->name); + printf("%s ", list_modes[i]->name); i++; } + printf("\n"); } /** @@ -132,25 +133,27 @@ static void show_cli_help(int argc __unused, char** argv __unused, /* List secondly the show modules of the mode */ if (current_mode->show_modules && current_mode->show_modules->modules) { - printf("show commands:\n"); + printf("\nshow commands:\n"); j = 0; while (current_mode->show_modules->modules[j].name) { - printf("\t%s\n", + printf("%s ", current_mode->show_modules->modules[j].name); j++; } + printf("\n"); } /* List thirdly the set modules of the mode */ if (current_mode->set_modules && current_mode->set_modules->modules) { - printf("set commands:\n"); + printf("\nset commands:\n"); j = 0; while (current_mode->set_modules->modules[j].name) { - printf("\t%s\n", + printf("%s ", current_mode->set_modules->modules[j].name); j++; } + printf("\n"); } /* List finally the default modules of the hdt mode */ @@ -177,6 +180,7 @@ static void show_cli_help(int argc __unused, char** argv __unused, printf("\n"); } + printf("\n"); main_show_modes(argc, argv, hardware); } |