X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/239d2e4dfb6fcfc26fe3f740efae8f6944b99799..20b6c0bb2103dd226f738def3f81ece6e3ebc77b:/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);