linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
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] infoblock: Make output mutually exclusive
Date: Tue,  7 Jul 2020 22:16:35 +0530	[thread overview]
Message-ID: <20200707164635.31217-1-harish@linux.ibm.com> (raw)

Patch fixes checking output filter option (-o <file> or -c) of
write-infoblock command to be mutually exclusive.

Signed-off-by: Harish <harish@linux.ibm.com>
---
 ndctl/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 0550580..d3ade25 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -440,7 +440,7 @@ static const char *parse_namespace_options(int argc, const char **argv,
 		rc = -EINVAL;
 	}
 
-	if (action == ACTION_WRITE_INFOBLOCK && (param.outfile || param.std_out)
+	if (action == ACTION_WRITE_INFOBLOCK && (param.outfile && param.std_out)
 			&& argc) {
 		error("specify only one of a namespace filter, --output, or --stdout\n");
 		rc = -EINVAL;
-- 
2.26.2
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

             reply	other threads:[~2020-07-07 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 16:46 Harish [this message]
2020-07-07 19:06 ` [ndctl PATCH] infoblock: Make output mutually exclusive Ira Weiny
2020-07-08  6:22 ` Harish

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=20200707164635.31217-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).