mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
993. [func] dig: -v now reports the version.
This commit is contained in:
parent
0262406cea
commit
e60b3717f0
2
CHANGES
2
CHANGES
@ -1,3 +1,5 @@
|
||||
993. [func] dig: -v now reports the version.
|
||||
|
||||
992. [doc] dig: ~/.digrc is now documented.
|
||||
|
||||
991. [func] Lower UDP refresh timeout messages to level
|
||||
|
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.160 2001/09/12 21:48:41 gson Exp $ */
|
||||
/* $Id: dig.c,v 1.161 2001/09/13 01:42:21 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
@ -137,13 +137,18 @@ print_usage(FILE *fp) {
|
||||
}
|
||||
|
||||
static void
|
||||
usage() {
|
||||
usage(void) {
|
||||
print_usage(stderr);
|
||||
fputs("\nUse \"dig -h\" (or \"dig -h | more\") "
|
||||
"for complete list of options\n", stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void
|
||||
version(void) {
|
||||
fputs("DiG " VERSION "\n", stderr);
|
||||
}
|
||||
|
||||
static void
|
||||
help(void) {
|
||||
print_usage(stdout);
|
||||
@ -195,7 +200,9 @@ help(void) {
|
||||
" +[no]dnssec (Request DNSSEC records)\n"
|
||||
" +[no]multiline (Print records in an expanded format)\n"
|
||||
" global d-opts and servers (before host name) affect all queries.\n"
|
||||
" local d-opts and servers (after host name) affect only that lookup.\n",
|
||||
" local d-opts and servers (after host name) affect only that lookup.\n"
|
||||
" -h (print help and exit)\n"
|
||||
" -v (print version and exit)\n",
|
||||
stdout);
|
||||
}
|
||||
|
||||
@ -932,6 +939,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
case 'n':
|
||||
nibble = ISC_TRUE;
|
||||
return (ISC_FALSE);
|
||||
case 'v':
|
||||
version();
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
if (value == NULL)
|
||||
goto invalid_option;
|
||||
|
Loading…
x
Reference in New Issue
Block a user