Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2015 03:04:39 GMT
From:      btw@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r287209 - soc2015/btw/head/tools/tools/mq-testing/udp
Message-ID:  <201506170304.t5H34dLi066914@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: btw
Date: Wed Jun 17 03:04:38 2015
New Revision: 287209
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287209

Log:
  - Add the support for -h option;
  - Document the -46h options in usage;
  - Refine the format of the usage message;

Modified:
  soc2015/btw/head/tools/tools/mq-testing/udp/server.c

Modified: soc2015/btw/head/tools/tools/mq-testing/udp/server.c
==============================================================================
--- soc2015/btw/head/tools/tools/mq-testing/udp/server.c	Wed Jun 17 02:47:30 2015	(r287208)
+++ soc2015/btw/head/tools/tools/mq-testing/udp/server.c	Wed Jun 17 03:04:38 2015	(r287209)
@@ -45,7 +45,7 @@
 static void
 usage(const char *prgname)
 {
-	fprintf(stderr, "%s [-v]\n", prgname);
+	fprintf(stderr, "Usage: %s [-46hv]\n", prgname);
 	exit(EXIT_FAILURE);
 }
 
@@ -84,7 +84,7 @@
 	char msg[BUFSIZ];
 	int n, ch, i;
 
-	while ((ch = getopt(argc, argv, "46v")) != -1) {
+	while ((ch = getopt(argc, argv, "46hv")) != -1) {
 		switch (ch) {
 		case '4':
 			ipversion = 4;
@@ -95,6 +95,7 @@
 		case 'v':
 			verbose = 1;
 			break;
+		case 'h':
 		default:
 			usage(argv[0]);
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506170304.t5H34dLi066914>