diff options
Diffstat (limited to 'bin/dnssec/dnssec-verify.c')
| -rw-r--r-- | bin/dnssec/dnssec-verify.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/bin/dnssec/dnssec-verify.c b/bin/dnssec/dnssec-verify.c index 682896cb768c..09e5211d47af 100644 --- a/bin/dnssec/dnssec-verify.c +++ b/bin/dnssec/dnssec-verify.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2012, 2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -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"); @@ -162,10 +161,11 @@ main(int argc, char *argv[]) { #endif char *classname = NULL; dns_rdataclass_t rdclass; - char ch, *endp; + char *endp; + int ch; #define CMDLINE_FLAGS \ - "m:o:I:c:E:v:xz" + "hm:o:I:c:E:v:Vxz" /* * Process memory debugging argument first. @@ -209,10 +209,6 @@ main(int argc, char *argv[]) { engine = isc_commandline_argument; break; - case 'h': - usage(); - break; - case 'I': inputformatstr = isc_commandline_argument; break; @@ -243,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", |
