From: Tomek Mrugalski Date: Fri, 19 Oct 2018 15:54:28 +0000 (+0200) Subject: [#148,!80] When run without arguments netconf,d2,ca prints out usage. X-Git-Tag: 130-all-keys-sample_base~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17e51a11f2aa28e03744be27a03a95d8304ff2e8;p=thirdparty%2Fkea.git [#148,!80] When run without arguments netconf,d2,ca prints out usage. --- diff --git a/src/lib/process/d_controller.cc b/src/lib/process/d_controller.cc index 9e388f0d3d..b35578a073 100644 --- a/src/lib/process/d_controller.cc +++ b/src/lib/process/d_controller.cc @@ -221,6 +221,11 @@ DControllerBase::checkConfigOnly() { void DControllerBase::parseArgs(int argc, char* argv[]) { + + if (argc == 1) { + isc_throw(InvalidUsage, ""); + } + // Iterate over the given command line options. If its a stock option // ("c" or "d") handle it here. If its a valid custom option, then // invoke customOption.