Documentation: write-infoblock namespace as mutually exclusive
Subsystems (2)
PATCH 1/1 Documentation: write-infoblock namespace as mutually exclusive
The write-infoblock command allows user to write to only one of namespace, stdout or to a file. Document that explicitly and also change the usage string to indicate mutual exclusion.
--- Documentation/ndctl/ndctl-write-infoblock.txt | 14 ++++++++------ ndctl/namespace.c | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-)
Documentation/ndctl/ndctl-write-infoblock.txt +8 -6
@@ -61,19 +61,21 @@ read 1 infoblock OPTIONS ------- -<namespace(s)>:: - One or more 'namespaceX.Y' device names. The keyword 'all' can be specified to - operate on every namespace in the system, optionally filtered by bus id (see - --bus= option), or region id (see --region= option). +<namespace>:: + Write the infoblock to 'namespaceX.Y' device name. The keyword 'all' can be + specified to operate on every namespace in the system, optionally filtered + by bus id (see --bus= option), or region id (see --region= option). + (mutually exclusive with --stdout and --output) -c:: --stdout:: - Write the infoblock to stdout + Write the infoblock to stdout (mutually + exclusive with <namespace> and --output) -o:: --output=:: Write the infoblock to the given file (mutually - exclusive with --stdout). + exclusive with <namespace> and --stdout). -m:: --mode=::
ndctl/namespace.c +3 -1
@@ -2346,7 +2346,9 @@ int cmd_read_infoblock(int argc, const char **argv, struct ndctl_ctx *ctx)int cmd_write_infoblock (int argc,const char **argv,struct ndctl_ctx *ctx) { -char *xable_usage ="ndctl write-infoblock <namespace> [<options>]" ; +char *xable_usage ="ndctl write-infoblock [<namespace> | -o <file> " +"| --stdout] [<options>]" ; +const char *namespace =parse_namespace_options (argc, argv,ACTION_WRITE_INFOBLOCK , write_infoblock_options, xable_usage);
Signature · 4 lines
2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Hi,
Quoted 47 lines · Harish
The write-infoblock command allows user to write to only one of namespace, stdout or to a file. Document that explicitly and also change the usage string to indicate mutual exclusion.
Signed-off-by Harish <[email protected]>--- Documentation/ndctl/ndctl-write-infoblock.txt | 14 ++++++++------ ndctl/namespace.c | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-)Documentation/ndctl/ndctl-write-infoblock.txt +8
-6@@ -61,19 +61,21 @@ read 1 infoblock OPTIONS ------- -<namespace(s)>:: - One or more 'namespaceX.Y' device names. The keyword 'all' can be specified to - operate on every namespace in the system, optionally filtered by bus id (see - --bus= option), or region id (see --region= option). +<namespace>:: + Write the infoblock to 'namespaceX.Y' device name. The keyword 'all' can be + specified to operate on every namespace in the system, optionally filtered + by bus id (see --bus= option), or region id (see --region= option). + (mutually exclusive with --stdout and --output) -c:: --stdout:: - Write the infoblock to stdout + Write the infoblock to stdout (mutually + exclusive with <namespace> and --output) -o:: --output=:: Write the infoblock to the given file (mutually - exclusive with --stdout). + exclusive with <namespace> and --stdout). -m:: --mode=::ndctl/namespace.c +0
-0
ndctl/namespace.c int cmd_read_infoblock(int argc, const char **argv, struct ndctl_ctx *ctx) · line 2351
Quoted 7 lines
ndctl/namespace.c +3
-1@@ -2346,7 +2346,9 @@ int cmd_read_infoblock(int argc, const char **argv, struct ndctl_ctx *ctx)int cmd_write_infoblock (int argc,const char **argv,struct ndctl_ctx *ctx) { -char *xable_usage ="ndctl write-infoblock <namespace> [<options>]" ; +char *xable_usage ="ndctl write-infoblock [<namespace> | -o <file> " +"| --stdout] [<options>]" ; +
This is now consistent with the man-page.
Since size (-s) mandatory with --stdout, should that be included in the usage too?
Usage: ndctl write-infoblock [<namespace> | -o <file> | -s SIZE --stdout] [<options>]
Thanks,
Santosh
Quoted 5 lines
ndctl/namespace.c +0
-0const char *namespace =parse_namespace_options (argc, argv,ACTION_WRITE_INFOBLOCK , write_infoblock_options, xable_usage);Signature · 1 line
2.26.2
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]