linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH 2/4] lnvm: do not print 0 when the arg is not given
Date: Mon, 22 Jul 2019 00:32:17 +0900	[thread overview]
Message-ID: <20190721153219.5730-3-minwoo.im.dev@gmail.com> (raw)
In-Reply-To: <20190721153219.5730-1-minwoo.im.dev@gmail.com>

If an argument is not given by the user, it just needs to show the
situation, not a prominent 0 which indicates the size of the argument
variable.

Cc: Keith Busch <kbusch at kernel.org>
Cc: Matias Bjorling <mb at lightnvm.io>
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
 plugins/lnvm/lnvm-nvme.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/lnvm/lnvm-nvme.c b/plugins/lnvm/lnvm-nvme.c
index 37b6733..aacd469 100644
--- a/plugins/lnvm/lnvm-nvme.c
+++ b/plugins/lnvm/lnvm-nvme.c
@@ -48,7 +48,7 @@ static int lnvm_init(int argc, char **argv, struct command *cmd, struct plugin *
 		return ret;
 
 	if (!strlen(cfg.devname)) {
-		fprintf(stderr, "device name missing %d\n", (int)strlen(cfg.devname));
+		fprintf(stderr, "device name missing\n");
 		return -EINVAL;
 	}
 
@@ -179,7 +179,7 @@ static int lnvm_create_tgt(int argc, char **argv, struct command *cmd, struct pl
 		return ret;
 
 	if (!strlen(cfg.devname)) {
-		fprintf(stderr, "device name missing %d\n", (int)strlen(cfg.devname));
+		fprintf(stderr, "device name missing\n");
 		return -EINVAL;
 	}
 	if (!strlen(cfg.tgtname)) {
@@ -265,7 +265,7 @@ static int lnvm_factory_init(int argc, char **argv, struct command *cmd, struct
 		return ret;
 
 	if (!strlen(cfg.devname)) {
-		fprintf(stderr, "device name missing %d\n", (int)strlen(cfg.devname));
+		fprintf(stderr, "device name missing\n");
 		return -EINVAL;
 	}
 
-- 
2.17.1

  parent reply	other threads:[~2019-07-21 15:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-21 15:32 [PATCH V2 0/4] lnvm: minor clean-ups Minwoo Im
2019-07-21 15:32 ` [PATCH 1/4] lnvm: remove redundant whitespace in lnvm_init() Minwoo Im
2019-07-23  5:39   ` Javier González
2019-07-21 15:32 ` Minwoo Im [this message]
2019-07-23  5:44   ` [PATCH 2/4] lnvm: do not print 0 when the arg is not given Javier González
2019-07-21 15:32 ` [PATCH 3/4] lnvm: cast identity structure to (void *) directly Minwoo Im
2019-07-23  5:44   ` Javier González
2019-07-21 15:32 ` [PATCH 4/4] lnvm: sync-up uapi lightnvm.h header from kernel Minwoo Im
2019-07-23  5:45   ` Javier González
2019-07-23  8:58 ` [PATCH V2 0/4] lnvm: minor clean-ups Matias Bjørling
2019-07-23 16:01   ` Keith Busch
  -- strict thread matches above, loose matches on Subject: below --
2019-07-21 15:26 [PATCH " Minwoo Im
2019-07-21 15:26 ` [PATCH 1/4] lnvm: remove redundant whitespace in lnvm_init() Minwoo Im
2019-07-21 15:26   ` [PATCH 2/4] lnvm: do not print 0 when the arg is not given Minwoo Im

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=20190721153219.5730-3-minwoo.im.dev@gmail.com \
    --to=minwoo.im.dev@gmail.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).