socsvn commit: r287209 - soc2015/btw/head/tools/tools/mq-testing/udp
btw at FreeBSD.org
btw at FreeBSD.org
Wed Jun 17 03:04:40 UTC 2015
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;
More information about the svn-soc-all
mailing list