From owner-svn-soc-all@FreeBSD.ORG Wed Jun 17 03:04:40 2015 Return-Path: Delivered-To: svn-soc-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45B319B4 for ; Wed, 17 Jun 2015 03:04:40 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33761C71 for ; Wed, 17 Jun 2015 03:04:40 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5H34edr066916 for ; Wed, 17 Jun 2015 03:04:40 GMT (envelope-from btw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5H34dLi066914 for svn-soc-all@FreeBSD.org; Wed, 17 Jun 2015 03:04:39 GMT (envelope-from btw@FreeBSD.org) Date: Wed, 17 Jun 2015 03:04:39 GMT Message-Id: <201506170304.t5H34dLi066914@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to btw@FreeBSD.org using -f From: btw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287209 - soc2015/btw/head/tools/tools/mq-testing/udp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2015 03:04:40 -0000 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;