public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Moritz Warning <moritzwarning@web.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batctl: indicate successful termination when -h is used
Date: Wed, 05 Dec 2012 09:40:10 +0100	[thread overview]
Message-ID: <50BF086A.4020505@web.de> (raw)

The return value of batctl -h indicates failure while
it should indicate a successful execution.


Signed-off-by: Moritz Warning <moritzwarning@web.de>
---
From: Moritz Warning <moritzwarning@web.de>
Subject: [PATCH] batctl: change return value to indicate successful
 termination when -h is used

---
 main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/main.c b/main.c
index 0a979bd..ea83bbf 100644
--- a/main.c
+++ b/main.c
@@ -114,8 +114,10 @@ int main(int argc, char **argv)
 		goto err;
 	}
 
-	if (strcmp(argv[1], "-h") == 0)
-		goto err;
+	if (strcmp(argv[1], "-h") == 0) {
+		print_usage();
+		exit(EXIT_SUCCESS);
+	}
 
 	if (strcmp(argv[1], "-v") == 0) {
 		printf("batctl %s [batman-adv: ", SOURCE_VERSION);

             reply	other threads:[~2012-12-05  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05  8:40 Moritz Warning [this message]
2012-12-15  8:21 ` [B.A.T.M.A.N.] [PATCH] batctl: indicate successful termination when -h is used Marek Lindner

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=50BF086A.4020505@web.de \
    --to=moritzwarning@web.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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