mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-22 01:10:41 -05:00
[10686] Add version printing option to various BIND utilites
Squashed commit of the following:
commit 95effe9b2582a7eb878ccb8cb9ef51dfc5bbfde7
Author: Evan Hunt <each@isc.org>
Date: Tue Jun 10 16:52:45 2014 -0700
[rt10686] move version() to dnssectool.c
commit df205b541d1572ea5306a5f671af8b54b9c5c770
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:38:31 2014 +0530
Rearrange order of cases
commit cfd30893f2540bf9d607e1fd37545ea7b441e0d0
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:38:08 2014 +0530
Add version printer to dnssec-verify
commit a625ea338c74ab5e21634033ef87f170ba37fdbe
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:32:19 2014 +0530
Add version printer to dnssec-signzone
commit d91e1c0f0697b3304ffa46fccc66af65591040d9
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:26:01 2014 +0530
Add version printer to dnssec-settime
commit 46fc8775da3e13725c31d13e090b406d69b8694f
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:25:48 2014 +0530
Fix docbook
commit 8123d2efbd84cdfcbc70403aa9bb27b96921bab2
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:20:17 2014 +0530
Add version printer to dnssec-revoke
commit d0916420317d3e8c69cf1b37d2209ea2d072b913
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:17:54 2014 +0530
Add version printer to dnssec-keygen
commit 93b0bd5ebc043298dc7d8f446ea543cb40eaecf8
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:14:11 2014 +0530
Add version printer to dnssec-keyfromlabel
commit 07001bcd9ae2d7b09dd9e243b0ab35307290d05d
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:13:39 2014 +0530
Update usage help output, docbook
commit 85cdd702f41c96fbc767fc689d1ed97fe1f3a926
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:07:18 2014 +0530
Add version printer to dnssec-importkey
commit 9274fc61e38205aad561edf445940b4e73d788dc
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 21:01:53 2014 +0530
Add version printer to dnssec-dsfromkey
commit bf4605ea2d7282e751fd73489627cc8a99f45a90
Author: Mukund Sivaraman <muks@isc.org>
Date: Tue Jun 10 20:49:22 2014 +0530
Add -V to nsupdate usage output
(cherry picked from commit 4278293107)
(cherry picked from commit ccba3c9ffd)
This commit is contained in:
parent
d5fe9da726
commit
2d2897f476
20 changed files with 183 additions and 47 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
3879. [func] Add version printing option to various BIND utilities.
|
||||
[RT #10686]
|
||||
|
||||
3878. [bug] Using the incorrect filename for a DLZ module
|
||||
caused a segmentation fault on startup. [RT #36286]
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-dsfromkey.c,v 1.24 2011/10/25 01:54:18 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -326,6 +324,7 @@ usage(void) {
|
|||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "Options:\n");
|
||||
fprintf(stderr, " -v <verbose level>\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, " -K <directory>: directory in which to find "
|
||||
"key file or keyset file\n");
|
||||
fprintf(stderr, " -a algorithm: digest algorithm "
|
||||
|
|
@ -375,7 +374,7 @@ main(int argc, char **argv) {
|
|||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"12Aa:c:d:Ff:K:l:sT:v:h")) != -1) {
|
||||
"12Aa:c:d:Ff:K:l:sT:v:hV")) != -1) {
|
||||
switch (ch) {
|
||||
case '1':
|
||||
dtype = DNS_DSDIGEST_SHA1;
|
||||
|
|
@ -432,8 +431,13 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@
|
|||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="req">dnsname</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
|
|
@ -210,6 +215,24 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints usage information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@ usage(void) {
|
|||
"the key files\n");
|
||||
fprintf(stderr, " -L ttl: set default key TTL\n");
|
||||
fprintf(stderr, " -v <verbose level>\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, " -h: print usage and exit\n");
|
||||
fprintf(stderr, "Timing options:\n");
|
||||
fprintf(stderr, " -P date/[+-]offset/none: set/unset key "
|
||||
|
|
@ -306,7 +307,7 @@ main(int argc, char **argv) {
|
|||
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
#define CMDLINE_FLAGS "D:f:hK:L:P:v:"
|
||||
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (ch) {
|
||||
case 'D':
|
||||
|
|
@ -346,8 +347,13 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
<arg><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg choice="req"><option>keyfile</option></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
|
|
@ -61,6 +62,7 @@
|
|||
<arg><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>dnsname</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
|
@ -147,6 +149,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-keyfromlabel.c,v 1.38 2011/11/30 00:48:51 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -94,6 +92,7 @@ usage(void) {
|
|||
"(default: AUTHCONF)\n");
|
||||
fprintf(stderr, " -y: permit keys that might collide\n");
|
||||
fprintf(stderr, " -v verbose level\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, "Date options:\n");
|
||||
fprintf(stderr, " -P date/[+-]offset: set key publication date\n");
|
||||
fprintf(stderr, " -A date/[+-]offset: set key activation date\n");
|
||||
|
|
@ -175,7 +174,7 @@ main(int argc, char **argv) {
|
|||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
#define CMDLINE_FLAGS "3A:a:Cc:D:E:Ff:GhI:i:kK:L:l:n:P:p:R:S:t:v:y"
|
||||
#define CMDLINE_FLAGS "3A:a:Cc:D:E:Ff:GhI:i:kK:L:l:n:P:p:R:S:t:v:Vy"
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (ch) {
|
||||
case '3':
|
||||
|
|
@ -298,8 +297,13 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
<arg><option>-S <replaceable class="parameter">key</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>-y</option></arg>
|
||||
<arg choice="req">name</arg>
|
||||
</cmdsynopsis>
|
||||
|
|
@ -304,6 +305,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-y</term>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-keygen.c,v 1.120 2011/11/30 00:48:51 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -142,6 +140,7 @@ usage(void) {
|
|||
fprintf(stderr, " -m <memory debugging mode>:\n");
|
||||
fprintf(stderr, " usage | trace | record | size | mctx\n");
|
||||
fprintf(stderr, " -v <level>: set verbosity level (0 - 10)\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, "Timing options:\n");
|
||||
fprintf(stderr, " -P date/[+-]offset/none: set key publication date "
|
||||
"(default: now)\n");
|
||||
|
|
@ -257,7 +256,8 @@ main(int argc, char **argv) {
|
|||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:kL:m:n:P:p:qR:r:S:s:T:t:v:"
|
||||
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:kL:m:n:P:p:qR:r:S:s:T:t:" \
|
||||
"v:V"
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (ch) {
|
||||
case 'm':
|
||||
|
|
@ -451,8 +451,13 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
<arg><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>-z</option></arg>
|
||||
<arg choice="req">name</arg>
|
||||
</cmdsynopsis>
|
||||
|
|
@ -417,6 +418,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-revoke.c,v 1.24 2011/10/20 23:46:51 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -65,6 +63,7 @@ usage(void) {
|
|||
fprintf(stderr, " -r: remove old keyfiles after "
|
||||
"creating revoked version\n");
|
||||
fprintf(stderr, " -v level: set level of verbosity\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, "Output:\n");
|
||||
fprintf(stderr, " K<name>+<alg>+<new id>.key, "
|
||||
"K<name>+<alg>+<new id>.private\n");
|
||||
|
|
@ -104,7 +103,7 @@ main(int argc, char **argv) {
|
|||
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:")) != -1) {
|
||||
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
|
||||
switch (ch) {
|
||||
case 'E':
|
||||
engine = isc_commandline_argument;
|
||||
|
|
@ -140,8 +139,13 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
/* Falls into */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
<command>dnssec-revoke</command>
|
||||
<arg><option>-hr</option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
|
||||
<arg><option>-f</option></arg>
|
||||
|
|
@ -105,6 +106,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-E <replaceable class="parameter">engine</replaceable></term>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-settime.c,v 1.32 2011/06/02 20:24:45 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -68,6 +66,7 @@ usage(void) {
|
|||
fprintf(stderr, " -K directory: set key file location\n");
|
||||
fprintf(stderr, " -L ttl: set default key TTL\n");
|
||||
fprintf(stderr, " -v level: set level of verbosity\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, " -h: help\n");
|
||||
fprintf(stderr, "Timing options:\n");
|
||||
fprintf(stderr, " -P date/[+-]offset/none: set/unset key "
|
||||
|
|
@ -171,7 +170,7 @@ main(int argc, char **argv) {
|
|||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
#define CMDLINE_FLAGS "A:D:E:fhI:i:K:L:P:p:R:S:uv:"
|
||||
#define CMDLINE_FLAGS "A:D:E:fhI:i:K:L:P:p:R:S:uv:V"
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (ch) {
|
||||
case 'E':
|
||||
|
|
@ -301,8 +300,13 @@ main(int argc, char **argv) {
|
|||
program, isc_commandline_option);
|
||||
/* Falls into */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
<arg><option>-I <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
|
||||
<arg choice="req">keyfile</arg>
|
||||
|
|
@ -140,6 +141,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@
|
|||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signzone.c,v 1.285 2011/12/22 07:32:39 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -2926,6 +2924,7 @@ usage(void) {
|
|||
fprintf(stderr, "\t-j jitter:\n");
|
||||
fprintf(stderr, "\t\trandomize signature end time up to jitter seconds\n");
|
||||
fprintf(stderr, "\t-v debuglevel (0)\n");
|
||||
fprintf(stderr, "\t-V:\tprint version information\n");
|
||||
fprintf(stderr, "\t-o origin:\n");
|
||||
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
|
||||
fprintf(stderr, "\t-f outfile:\n");
|
||||
|
|
@ -2981,6 +2980,7 @@ usage(void) {
|
|||
fprintf(stderr, "Signing Keys: ");
|
||||
fprintf(stderr, "(default: all zone keys that have private keys)\n");
|
||||
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
@ -3063,7 +3063,7 @@ main(int argc, char *argv[]) {
|
|||
|
||||
/* Unused letters: Bb G J M q Yy (and F is reserved). */
|
||||
#define CMDLINE_FLAGS \
|
||||
"3:AaCc:Dd:E:e:f:FghH:i:I:j:K:k:L:l:m:n:N:o:O:PpQRr:s:ST:tuUv:X:xzZ:"
|
||||
"3:AaCc:Dd:E:e:f:FghH:i:I:j:K:k:L:l:m:n:N:o:O:PpQRr:s:ST:tuUv:VX:xzZ:"
|
||||
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
|
|
@ -3180,10 +3180,6 @@ main(int argc, char *argv[]) {
|
|||
fatal("iterations too big");
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage();
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
inputformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
|
@ -3330,17 +3326,24 @@ main(int argc, char *argv[]) {
|
|||
if (isc_commandline_option != '?')
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
case 'Z': /* Undocumented test options */
|
||||
if (!strcmp(isc_commandline_argument, "nonsecify"))
|
||||
nonsecify = ISC_TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
exit(1);
|
||||
case 'Z': /* Undocumented test options */
|
||||
if (!strcmp(isc_commandline_argument, "nonsecify"))
|
||||
nonsecify = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
<arg><option>-t</option></arg>
|
||||
<arg><option>-u</option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>-X <replaceable class="parameter">extended end-time</replaceable></option></arg>
|
||||
<arg><option>-x</option></arg>
|
||||
<arg><option>-z</option></arg>
|
||||
|
|
@ -308,6 +309,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i <replaceable class="parameter">interval</replaceable></term>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-verify.c,v 1.1.2.1 2011/03/16 06:37:51 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
|
@ -131,6 +129,7 @@ usage(void) {
|
|||
|
||||
fprintf(stderr, "Options: (default value in parenthesis) \n");
|
||||
fprintf(stderr, "\t-v debuglevel (0)\n");
|
||||
fprintf(stderr, "\t-V:\tprint version information\n");
|
||||
fprintf(stderr, "\t-o origin:\n");
|
||||
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
|
||||
fprintf(stderr, "\t-I format:\n");
|
||||
|
|
@ -166,7 +165,7 @@ main(int argc, char *argv[]) {
|
|||
int ch;
|
||||
|
||||
#define CMDLINE_FLAGS \
|
||||
"m:o:I:c:E:v:xz"
|
||||
"hm:o:I:c:E:v:Vxz"
|
||||
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
|
|
@ -210,10 +209,6 @@ main(int argc, char *argv[]) {
|
|||
engine = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage();
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
inputformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
|
@ -244,8 +239,15 @@ main(int argc, char *argv[]) {
|
|||
if (isc_commandline_option != '?')
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 'h':
|
||||
/* Does not return. */
|
||||
usage();
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
/* Does not return. */
|
||||
version(program);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
<arg><option>-I <replaceable class="parameter">input-format</replaceable></option></arg>
|
||||
<arg><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
<arg><option>-x</option></arg>
|
||||
<arg><option>-z</option></arg>
|
||||
<arg choice="req">zonefile</arg>
|
||||
|
|
@ -112,6 +113,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints version information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-x</term>
|
||||
<listitem>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssectool.c,v 1.63 2011/10/21 03:55:33 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*%
|
||||
|
|
@ -121,6 +119,12 @@ vbprintf(int level, const char *fmt, ...) {
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
version(const char *program) {
|
||||
fprintf(stderr, "%s %s\n", program, VERSION);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
type_format(const dns_rdatatype_t type, char *cp, unsigned int size) {
|
||||
isc_buffer_t b;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ check_result(isc_result_t result, const char *message);
|
|||
void
|
||||
vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
|
||||
|
||||
void
|
||||
version(const char *program);
|
||||
|
||||
void
|
||||
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
|
||||
#define TYPE_FORMATSIZE 20
|
||||
|
|
|
|||
|
|
@ -962,6 +962,11 @@ get_addresses(char *host, in_port_t port,
|
|||
host, isc_result_totext(result));
|
||||
}
|
||||
|
||||
static void
|
||||
version(void) {
|
||||
fputs("nsupdate " VERSION "\n", stderr);
|
||||
}
|
||||
|
||||
#define PARSE_ARGS_FMT "dDML:y:ghlovk:p:r:R::t:u:V"
|
||||
|
||||
static void
|
||||
|
|
@ -985,7 +990,11 @@ pre_parse_args(int argc, char **argv) {
|
|||
argv[0], isc_commandline_option);
|
||||
fprintf(stderr, "usage: nsupdate [-dD] [-L level] [-l]"
|
||||
"[-g | -o | -y keyname:secret | -k keyfile] "
|
||||
"[-v] [filename]\n");
|
||||
"[-v] [-V] [filename]\n");
|
||||
exit(1);
|
||||
|
||||
case 'V':
|
||||
version();
|
||||
exit(1);
|
||||
|
||||
default:
|
||||
|
|
@ -996,11 +1005,6 @@ pre_parse_args(int argc, char **argv) {
|
|||
isc_commandline_index = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
version(void) {
|
||||
fputs("nsupdate " VERSION "\n", stderr);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(int argc, char **argv, isc_mem_t *mctx, isc_entropy_t **ectx) {
|
||||
int ch;
|
||||
|
|
@ -1038,10 +1042,6 @@ parse_args(int argc, char **argv, isc_mem_t *mctx, isc_entropy_t **ectx) {
|
|||
case 'v':
|
||||
usevc = ISC_TRUE;
|
||||
break;
|
||||
case 'V':
|
||||
version();
|
||||
exit(0);
|
||||
break;
|
||||
case 'k':
|
||||
keyfile = isc_commandline_argument;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue