diff mbox

[ndctl,11/13] ndctl: suggest --list-cmds for command discovery

Message ID 20160128225255.17855.20236.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Williams Jan. 28, 2016, 10:52 p.m. UTC
Running ndctl with no options should indicate how to discover more
information.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 ndctl.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/ndctl.c b/ndctl.c
index 8fadc6b2e305..1726243369b1 100644
--- a/ndctl.c
+++ b/ndctl.c
@@ -13,7 +13,8 @@ 
 
 const char ndctl_usage_string[] = "ndctl [--version] [--help] COMMAND [ARGS]";
 const char ndctl_more_info_string[] =
-	"See 'ndctl help COMMAND' for more information on a specific command.";
+	"See 'ndctl help COMMAND' for more information on a specific command.\n"
+	"ndctl --list-cmds to see all available commands";
 
 static int cmd_version(int argc, const char **argv)
 {
@@ -71,7 +72,7 @@  static int handle_options(const char ***argv, int *argc)
 
 			for (i = 0; i < ARRAY_SIZE(commands); i++) {
 				struct cmd_struct *p = commands+i;
-				printf("%s ", p->cmd);
+				printf("%s\n", p->cmd);
 			}
 			exit(0);
 		} else {