~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regression tests for srv, part 1
[adns]
/
client
/
adh-opts.c
diff --git
a/client/adh-opts.c
b/client/adh-opts.c
index
af8afbd
..
a649037
100644
(file)
--- a/
client/adh-opts.c
+++ b/
client/adh-opts.c
@@
-5,11
+5,11
@@
*/
/*
* This file is
*/
/*
* This file is
- * Copyright (C) 1997-
1999
Ian Jackson <ian@davenant.greenend.org.uk>
+ * Copyright (C) 1997-
2000
Ian Jackson <ian@davenant.greenend.org.uk>
*
* It is part of adns, which is
*
* It is part of adns, which is
- * Copyright (C) 1997-
1999
Ian Jackson <ian@davenant.greenend.org.uk>
- * Copyright (C) 1999 Tony Finch <dot@dotat.at>
+ * Copyright (C) 1997-
2000
Ian Jackson <ian@davenant.greenend.org.uk>
+ * Copyright (C) 1999
-2000
Tony Finch <dot@dotat.at>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-62,6
+62,10
@@
static const struct optioninfo global_options[]= {
"Vd", "debug", &ov_verbose, adns_if_debug },
{ ot_desconly, "other global options:" },
"Vd", "debug", &ov_verbose, adns_if_debug },
{ ot_desconly, "other global options:" },
+ { ot_funcarg, "Configuration to use instead of /etc/resolv.conf",
+ 0, "config", 0,0, of_config, "<config-text>" },
+ { ot_func, "Print version number",
+ 0, "version", 0,0, of_version },
{ ot_func, "Print usage information",
0, "help", 0,0, of_help },
{ ot_func, "Print usage information",
0, "help", 0,0, of_help },
@@
-259,18
+263,22
@@
static void printusage(void) {
" 11 usage problems\n"
"\n"
"Query types (see adns.h; default is addr):\n"
" 11 usage problems\n"
"\n"
"Query types (see adns.h; default is addr):\n"
- " ns soa ptr mx rp addr - enhanced versions\n"
- " cname hinfo txt - types with only one version\n"
- " a ns- soa- ptr- mx- rp- - _raw versions\n"
+ " ns soa ptr mx rp
srv
addr - enhanced versions\n"
+ " cname hinfo txt
- types with only one version\n"
+ " a ns- soa- ptr- mx- rp-
srv-
- _raw versions\n"
"Default is addr, or ptr for -i/--ptr queries\n",
stdout);
if (ferror(stdout)) sysfail("write usage message",errno);
}
"Default is addr, or ptr for -i/--ptr queries\n",
stdout);
if (ferror(stdout)) sysfail("write usage message",errno);
}
+void of_version(const struct optioninfo *oi, const char *arg, const char *arg2) {
+ VERSION_PRINT_QUIT("adnshost");
+}
+
void of_help(const struct optioninfo *oi, const char *arg, const char *arg2) {
printusage();
if (fclose(stdout)) sysfail("finish writing output",errno);
void of_help(const struct optioninfo *oi, const char *arg, const char *arg2) {
printusage();
if (fclose(stdout)) sysfail("finish writing output",errno);
-
exit
(0);
+
quitnow
(0);
}
typedef int comparer_type(const char **optp, const struct optioninfo *entry);
}
typedef int comparer_type(const char **optp, const struct optioninfo *entry);