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(-) diff --git a/Documentation/ndctl/ndctl-write-infoblock.txt b/Documentation/ndctl/ndctl-write-infoblock.txt index 8197559..c29327d 100644 --- a/Documentation/ndctl/ndctl-write-infoblock.txt +++ b/Documentation/ndctl/ndctl-write-infoblock.txt @@ -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=:: diff --git a/ndctl/namespace.c b/ndctl/namespace.c index 0550580..cf6c4ea 100644 --- a/ndctl/namespace.c +++ b/ndctl/namespace.c @@ -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); -- 2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
