From: Pieter Lexis Date: Fri, 29 Apr 2016 14:41:15 +0000 (+0200) Subject: Add --help and --version to dnsbulktest X-Git-Tag: rec-4.0.0-alpha3~19^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2c701a09c894f78745c14bd3c1c54ae8ef65b52;p=thirdparty%2Fpdns.git Add --help and --version to dnsbulktest --- diff --git a/docs/manpages/dnsbulktest.1.md b/docs/manpages/dnsbulktest.1.md index 6e3a10a565..a3a3e698e3 100644 --- a/docs/manpages/dnsbulktest.1.md +++ b/docs/manpages/dnsbulktest.1.md @@ -25,3 +25,6 @@ domain names from STDIN in the alexa topX format and outputs statistics on STDOU --envoutput, -e : Write results on STDOUT as shell environment variables + +--version +: Display the version of dnsbulktest diff --git a/pdns/dnsbulktest.cc b/pdns/dnsbulktest.cc index 18a5dbc65f..6636dc90de 100644 --- a/pdns/dnsbulktest.cc +++ b/pdns/dnsbulktest.cc @@ -188,6 +188,11 @@ struct SendReceive unsigned int d_receiveds, d_receiveerrors, d_senderrors; }; +void usage(po::options_description &desc) { + cerr << "Usage: dnsbulktest [OPTION].. IPADDRESS PORTNUMBER [LIMIT]"<()->default_value("A"), "What type to query for") ("envoutput,e", "write report in shell environment format") + ("version", "show the version number") ; po::options_description alloptions; @@ -216,15 +222,18 @@ try po::notify(g_vm); if (g_vm.count("help")) { - cerr << "Usage: dnsbulktest [--options] ip-address portnumber [limit]"<