diff mbox

[ndctl] ndctl, {read, write}-labels: add long options for -i and -o

Message ID 149076370167.25786.11455901992745209762.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State Accepted
Commit 40347efafdd2
Headers show

Commit Message

Dan Williams March 29, 2017, 5:01 a.m. UTC
Without long options the bash completion code is unable to determine the
available options with "--list-opts".

Reported-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 Documentation/ndctl-read-labels.txt |    1 +
 ndctl/dimm.c                        |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/Documentation/ndctl-read-labels.txt b/Documentation/ndctl-read-labels.txt
index 9c3acede8723..ecef164c3283 100644
--- a/Documentation/ndctl-read-labels.txt
+++ b/Documentation/ndctl-read-labels.txt
@@ -18,6 +18,7 @@  OPTIONS
 -------
 include::labels-options.txt[]
 -o::
+--output::
 	output file
 -j::
 --json::
diff --git a/ndctl/dimm.c b/ndctl/dimm.c
index 4d25417fb2ae..f6a07a7f4c6e 100644
--- a/ndctl/dimm.c
+++ b/ndctl/dimm.c
@@ -790,12 +790,12 @@  OPT_STRING('b', "bus", &param.bus, "bus-id", \
 OPT_BOOLEAN('v',"verbose", &param.verbose, "turn on debug")
 
 #define READ_OPTIONS() \
-OPT_STRING('o', NULL, &param.outfile, "output-file", \
+OPT_STRING('o', "output", &param.outfile, "output-file", \
 	"filename to write label area contents"), \
 OPT_BOOLEAN('j', "json", &param.json, "parse label data into json")
 
 #define WRITE_OPTIONS() \
-OPT_STRING('i', NULL, &param.infile, "input-file", \
+OPT_STRING('i', "input", &param.infile, "input-file", \
 	"filename to read label area data")
 
 #define INIT_OPTIONS() \