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.
|
992. [doc] dig: ~/.digrc is now documented.
|
||||||
|
|
||||||
991. [func] Lower UDP refresh timeout messages to level
|
991. [func] Lower UDP refresh timeout messages to level
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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 <config.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -137,13 +137,18 @@ print_usage(FILE *fp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage() {
|
usage(void) {
|
||||||
print_usage(stderr);
|
print_usage(stderr);
|
||||||
fputs("\nUse \"dig -h\" (or \"dig -h | more\") "
|
fputs("\nUse \"dig -h\" (or \"dig -h | more\") "
|
||||||
"for complete list of options\n", stderr);
|
"for complete list of options\n", stderr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
version(void) {
|
||||||
|
fputs("DiG " VERSION "\n", stderr);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
help(void) {
|
help(void) {
|
||||||
print_usage(stdout);
|
print_usage(stdout);
|
||||||
@ -195,7 +200,9 @@ help(void) {
|
|||||||
" +[no]dnssec (Request DNSSEC records)\n"
|
" +[no]dnssec (Request DNSSEC records)\n"
|
||||||
" +[no]multiline (Print records in an expanded format)\n"
|
" +[no]multiline (Print records in an expanded format)\n"
|
||||||
" global d-opts and servers (before host name) affect all queries.\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);
|
stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -932,6 +939,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
case 'n':
|
case 'n':
|
||||||
nibble = ISC_TRUE;
|
nibble = ISC_TRUE;
|
||||||
return (ISC_FALSE);
|
return (ISC_FALSE);
|
||||||
|
case 'v':
|
||||||
|
version();
|
||||||
|
exit(0);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user