public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batctl: indicate successful termination when -h is used
@ 2012-12-05  8:40 Moritz Warning
  2012-12-15  8:21 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Moritz Warning @ 2012-12-05  8:40 UTC (permalink / raw)
  To: b.a.t.m.a.n

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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-15  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05  8:40 [B.A.T.M.A.N.] [PATCH] batctl: indicate successful termination when -h is used Moritz Warning
2012-12-15  8:21 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox