From: Harish <harish@linux.ibm.com>
To: linux-nvdimm@lists.01.org, dan.j.williams@intel.com,
vishal.l.verma@intel.com
Cc: Harish <harish@linux.ibm.com>
Subject: [ndctl PATCH] Documentation: write-infoblock namespace as mutually exclusive
Date: Wed, 8 Jul 2020 12:53:19 +0530 [thread overview]
Message-ID: <20200708072319.10896-1-harish@linux.ibm.com> (raw)
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 <harish@linux.ibm.com>
---
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 -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next reply other threads:[~2020-07-08 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 7:23 Harish [this message]
2020-07-08 10:18 ` [ndctl PATCH] Documentation: write-infoblock namespace as mutually exclusive Santosh Sivaraj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200708072319.10896-1-harish@linux.ibm.com \
--to=harish@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).