From 6ae3a5d13193d2b2ca6caba17ad7898d9c54b4f5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 12 Mar 2023 11:11:05 +0100 Subject: Adding upstream version 2.11.1. Signed-off-by: Daniel Baumann --- CHANGES | 9 +++++++++ configure | 20 ++++++++++---------- configure.ac | 2 +- src/opt.c | 8 ++++++-- src/test/test1.sh | 3 +++ 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CHANGES b/CHANGES index 7dd03c4..2bdd203 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +2023-03-10 Jerry Lundström + + Release 2.11.1 + + Fixed long option argument handling that broke in v2.11.0 and enhanced + long option help text, now includes argument type. + + 034e893 Long opt + 2023-02-08 Jerry Lundström Release 2.11.0 diff --git a/configure b/configure index 91c1516..8780f36 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dnsperf 2.11.0. +# Generated by GNU Autoconf 2.69 for dnsperf 2.11.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dnsperf' PACKAGE_TARNAME='dnsperf' -PACKAGE_VERSION='2.11.0' -PACKAGE_STRING='dnsperf 2.11.0' +PACKAGE_VERSION='2.11.1' +PACKAGE_STRING='dnsperf 2.11.1' PACKAGE_BUGREPORT='admin@dns-oarc.net' PACKAGE_URL='https://github.com/DNS-OARC/dnsperf/issues' @@ -1362,7 +1362,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dnsperf 2.11.0 to adapt to many kinds of systems. +\`configure' configures dnsperf 2.11.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1433,7 +1433,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dnsperf 2.11.0:";; + short | recursive ) echo "Configuration of dnsperf 2.11.1:";; esac cat <<\_ACEOF @@ -1572,7 +1572,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dnsperf configure 2.11.0 +dnsperf configure 2.11.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1941,7 +1941,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dnsperf $as_me 2.11.0, which was +It was created by dnsperf $as_me 2.11.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2804,7 +2804,7 @@ fi # Define the identity of the package. PACKAGE='dnsperf' - VERSION='2.11.0' + VERSION='2.11.1' cat >>confdefs.h <<_ACEOF @@ -14436,7 +14436,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dnsperf $as_me 2.11.0, which was +This file was extended by dnsperf $as_me 2.11.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14503,7 +14503,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dnsperf config.status 2.11.0 +dnsperf config.status 2.11.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index fa664da..19458dc 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ # limitations under the License. AC_PREREQ(2.64) -AC_INIT([dnsperf], [2.11.0], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues]) +AC_INIT([dnsperf], [2.11.1], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) AC_CONFIG_SRCDIR([src/dnsperf.c]) AC_CONFIG_HEADER([src/config.h]) diff --git a/src/opt.c b/src/opt.c index 7a0f346..bd0bc52 100644 --- a/src/opt.c +++ b/src/opt.c @@ -240,7 +240,7 @@ static int perf_opt_long_parse(char* optarg) if ((arg = strchr(optarg, '='))) { arg++; - optlen = arg - optarg; + optlen = strlen(arg); if (optlen < 1) { return -1; } @@ -305,7 +305,11 @@ void perf_long_opt_usage(void) fprintf(stderr, "Usage: %s ... -O [=] ...\n\nAvailable long options:\n", progname); long_opt_t* opt = longopts; while (opt) { - fprintf(stderr, " %s%s: %s", opt->name, opt->type != perf_opt_boolean ? "=" : "", opt->help); + if (opt->type == perf_opt_boolean) { + fprintf(stderr, " %s: %s", opt->name, opt->help); + } else { + fprintf(stderr, " %s=<%s>: %s", opt->name, opt->desc ? opt->desc : "val", opt->help); + } if (opt->defval) { fprintf(stderr, " (default: %s)", opt->defval); } diff --git a/src/test/test1.sh b/src/test/test1.sh index cd6af3c..a289c99 100755 --- a/src/test/test1.sh +++ b/src/test/test1.sh @@ -7,3 +7,6 @@ ! ../dnsperf -O suppress= ! ../resperf -O suppress ! ../resperf -O suppress= + +# test for broken long opt in v2.11.0 +../dnsperf -O suppress=test 2>&1 |grep -q "unknown message type to suppress: test" -- cgit v1.2.3