socsvn commit: r287218 - soc2015/btw/head/tools/tools/mq-testing/udp

btw at FreeBSD.org btw at FreeBSD.org
Wed Jun 17 06:39:43 UTC 2015


Author: btw
Date: Wed Jun 17 06:39:42 2015
New Revision: 287218
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287218

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

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

Modified: soc2015/btw/head/tools/tools/mq-testing/udp/pktgen.c
==============================================================================
--- soc2015/btw/head/tools/tools/mq-testing/udp/pktgen.c	Wed Jun 17 04:46:58 2015	(r287217)
+++ soc2015/btw/head/tools/tools/mq-testing/udp/pktgen.c	Wed Jun 17 06:39:42 2015	(r287218)
@@ -238,8 +238,10 @@
 static void
 usage(const char *prgname)
 {
-	fprintf(stderr, "%s [-a ip address] [-i vme interface] [-l pktsize] "
-	    "[-p payload] [-q]\n", prgname);
+	fprintf(stderr,
+	    "Usage: %s [-a ip address] [-i vme interface] [-l pktsize]\n"
+	    "       %*s [-p payload] [-b cpu] [-46hq]\n",
+	    prgname, (int)strlen(prgname), "");
 	exit(EXIT_FAILURE);
 }
 
@@ -252,7 +254,7 @@
 	uint8_t *buf;
 	int ch;
 
-	while ((ch = getopt(argc, argv, "a:b:i:l:p:q46")) != -1) {
+	while ((ch = getopt(argc, argv, "a:b:i:l:p:hq46")) != -1) {
 		switch (ch) {
 		case 'a':
 			strlcpy(vmeif_ipstr, optarg, sizeof(vmeif_ipstr));
@@ -278,6 +280,7 @@
 		case '6':
 			ipversion = 6;
 			break;
+		case 'h':
 		default:
 			usage(argv[0]);
 			break;


More information about the svn-soc-all mailing list