All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: fujita.tomonori@lab.ntt.co.jp
Cc: stgt@vger.kernel.org, Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Subject: [PATCH 1/2] tgtadm: Correct mode names in the option error message
Date: Sat, 18 Jan 2014 13:27:15 +0800	[thread overview]
Message-ID: <52DA10B3.7010309@gmail.com> (raw)

From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>

When an error option is specified for some mode and operation,
tgtadm outputs an error message which contains the mode name.
But some of the mode names are obviously wrong so the patch fixes
them.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
 usr/tgtadm.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/usr/tgtadm.c b/usr/tgtadm.c
index 7771119..d708a65 100644
--- a/usr/tgtadm.c
+++ b/usr/tgtadm.c
@@ -739,7 +739,7 @@ int main(int argc, char **argv)
 		case OP_NEW:
 			rc = verify_mode_params(argc, argv, "LmoupfC");
 			if (rc) {
-				eprintf("logicalunit mode: option '-%c' is "
+				eprintf("account mode: option '-%c' is "
 					"not allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -752,7 +752,7 @@ int main(int argc, char **argv)
 		case OP_SHOW:
 			rc = verify_mode_params(argc, argv, "LmoC");
 			if (rc) {
-				eprintf("target mode: option '-%c' is not "
+				eprintf("account mode: option '-%c' is not "
 					"allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -760,7 +760,7 @@ int main(int argc, char **argv)
 		case OP_DELETE:
 			rc = verify_mode_params(argc, argv, "LmouC");
 			if (rc) {
-				eprintf("target mode: option '-%c' is not "
+				eprintf("account mode: option '-%c' is not "
 					"allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -768,7 +768,7 @@ int main(int argc, char **argv)
 		case OP_BIND:
 			rc = verify_mode_params(argc, argv, "LmotuOC");
 			if (rc) {
-				eprintf("target mode: option '-%c' is not "
+				eprintf("account mode: option '-%c' is not "
 					"allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -782,7 +782,7 @@ int main(int argc, char **argv)
 		case OP_UNBIND:
 			rc = verify_mode_params(argc, argv, "LmotuOC");
 			if (rc) {
-				eprintf("target mode: option '-%c' is not "
+				eprintf("account mode: option '-%c' is not "
 					"allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -817,7 +817,7 @@ int main(int argc, char **argv)
 		case OP_NEW:
 			rc = verify_mode_params(argc, argv, "LmofytlbEYCS");
 			if (rc) {
-				eprintf("target mode: option '-%c' is not "
+				eprintf("logicalunit mode: option '-%c' is not "
 					  "allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -833,7 +833,7 @@ int main(int argc, char **argv)
 		case OP_STATS:
 			rc = verify_mode_params(argc, argv, "LmotlC");
 			if (rc) {
-				eprintf("target mode: option '-%c' is not "
+				eprintf("logicalunit mode: option '-%c' is not "
 					  "allowed/supported\n", rc);
 				exit(EINVAL);
 			}
@@ -905,7 +905,7 @@ int main(int argc, char **argv)
 		case OP_SHOW:
 			rc = verify_mode_params(argc, argv, "LmoC");
 			if (rc) {
-				eprintf("system mode: option '-%c' is not "
+				eprintf("lld mode: option '-%c' is not "
 					"allowed/supported\n", rc);
 				exit(EINVAL);
 			}
-- 
1.7.1

             reply	other threads:[~2014-01-18  5:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-18  5:27 Zhang Yanfei [this message]
2014-01-18  5:28 ` [PATCH 2/2] tgtadm: display unsupported operation name explicitly Zhang Yanfei
2014-01-18  6:22 ` [PATCH 1/2] tgtadm: Correct mode names in the option error message FUJITA Tomonori

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=52DA10B3.7010309@gmail.com \
    --to=zhangyanfei.yes@gmail.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=stgt@vger.kernel.org \
    --cc=zhangyanfei@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.