diff options
author | Jirka Hladky <jhladky@redhat.com> | 2020-06-28 03:58:06 +0200 |
---|---|---|
committer | Jirka Hladky <jhladky@redhat.com> | 2020-06-28 03:58:06 +0200 |
commit | 83d7b228ca36f58779fab1426752dcf6b1ddf447 (patch) | |
tree | 29386485ff9efc3e4120d7f09955b3b7ba42416f | |
parent | Bumped version to 1.9.12 (diff) | |
download | haveged-83d7b228ca36f58779fab1426752dcf6b1ddf447.tar.xz haveged-83d7b228ca36f58779fab1426752dcf6b1ddf447.zip |
Added support for --verion
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/havege.h | 4 | ||||
-rw-r--r-- | src/haveged.c | 16 |
4 files changed, 29 insertions, 13 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for haveged 1.9.12. +# Generated by GNU Autoconf 2.69 for haveged 1.9.13. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='haveged' PACKAGE_TARNAME='haveged' -PACKAGE_VERSION='1.9.12' -PACKAGE_STRING='haveged 1.9.12' +PACKAGE_VERSION='1.9.13' +PACKAGE_STRING='haveged 1.9.13' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1326,7 +1326,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 haveged 1.9.12 to adapt to many kinds of systems. +\`configure' configures haveged 1.9.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1396,7 +1396,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of haveged 1.9.12:";; + short | recursive ) echo "Configuration of haveged 1.9.13:";; esac cat <<\_ACEOF @@ -1515,7 +1515,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -haveged configure 1.9.12 +haveged configure 1.9.13 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1934,7 +1934,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 haveged $as_me 1.9.12, which was +It was created by haveged $as_me 1.9.13, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4106,7 +4106,7 @@ fi # Define the identity of the package. PACKAGE='haveged' - VERSION='1.9.12' + VERSION='1.9.13' cat >>confdefs.h <<_ACEOF @@ -13979,7 +13979,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 haveged $as_me 1.9.12, which was +This file was extended by haveged $as_me 1.9.13, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14045,7 +14045,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="\\ -haveged config.status 1.9.12 +haveged config.status 1.9.13 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 3f573b9..e55800c 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ ## Minimum Autoconf version AC_PREREQ([2.59]) -AC_INIT([haveged],[1.9.12]) +AC_INIT([haveged],[1.9.13]) AC_CONFIG_AUX_DIR(config) AC_USE_SYSTEM_EXTENSIONS AC_CONFIG_HEADER([config.h]) diff --git a/src/havege.h b/src/havege.h index 615f59f..937b284 100644 --- a/src/havege.h +++ b/src/havege.h @@ -29,9 +29,9 @@ extern "C" { #endif /** * header/package version as a numeric major, minor, patch triple. See havege_version() - * below for useage. + * below for usage. */ -#define HAVEGE_PREP_VERSION "1.9.12" +#define HAVEGE_PREP_VERSION "1.9.13" /** * Basic types */ diff --git a/src/haveged.c b/src/haveged.c index 53f71df..85d5ee4 100644 --- a/src/haveged.c +++ b/src/haveged.c @@ -52,6 +52,18 @@ #define STRZ(a) #a #define SETTINGL(msg,val) STRZ(val) msg #define SETTINGR(msg,val) msg STRZ(val) + +// {{{ VERSION_TEXT +static const char* VERSION_TEXT = + "haveged %s\n\n" + "Copyright (C) 2018-2020 Jirka Hladky <hladky.jiri@gmail.com>\n" + "Copyright (C) 2009-2014 Gary Wuertz <gary@issiweb.com>\n" + "Copyright (C) 2011-2012 BenEleventh Consulting <manolson@beneleventh.com>\n\n" + "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n" + "This is free software: you are free to change and redistribute it.\n" + "There is NO WARRANTY, to the extent permitted by law.\n"; +// }}} VERSION_TEXT + /** * Parameters */ @@ -142,6 +154,7 @@ int main(int argc, char **argv) #endif "v", "verbose", "1", "Verbose mask 0=none,1=summary,2=retries,4=timing,8=loop,16=code,32=test", "w", "write", "1", "Set write_wakeup_threshold [bits]", + "V", "version", "0", "Print version information and exit", "h", "help", "0", "This help" }; static int nopts = sizeof(cmds)/(4*sizeof(char *)); @@ -315,6 +328,9 @@ int main(int argc, char **argv) case '?': case 'h': usage(0, nopts, long_options, cmds); + case 'V': + printf(VERSION_TEXT, HAVEGE_PREP_VERSION); + exit(EXIT_SUCCESS); case -1: break; } |