Date: Wed, 17 Jun 2015 06:39:43 GMT From: btw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287218 - soc2015/btw/head/tools/tools/mq-testing/udp Message-ID: <201506170639.t5H6dhCf081911@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506170639.t5H6dhCf081911>