X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/bef232aebeabbef525faa7d7f5b08cf7a1427f95..c227e3bcc4a3d9e4a076e19976f8b2bb153143e7:/client/adh-opts.c diff --git a/client/adh-opts.c b/client/adh-opts.c index fa5cceb..9805e5e 100644 --- a/client/adh-opts.c +++ b/client/adh-opts.c @@ -64,6 +64,8 @@ static const struct optioninfo global_options[]= { { ot_desconly, "other global options:" }, { ot_funcarg, "Configuration to use instead of /etc/resolv.conf", 0, "config", 0,0, of_config, "" }, + { ot_func, "Print version number", + 0, "version", 0,0, of_version }, { ot_func, "Print usage information", 0, "help", 0,0, of_help }, @@ -269,6 +271,10 @@ static void printusage(void) { 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);