From: Arvin Schnell Date: Fri, 28 Aug 2020 09:13:09 +0000 (+0200) Subject: - improved error reporting in getopt wrapper (part of bsc#1150156) X-Git-Tag: v0.8.14~32^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b441000cc7913f555883e2cc56bb1b22264ca624;p=thirdparty%2Fsnapper.git - improved error reporting in getopt wrapper (part of bsc#1150156) --- diff --git a/client/Command/GetConfig.cc b/client/Command/GetConfig.cc index 1c743498..aecd211b 100644 --- a/client/Command/GetConfig.cc +++ b/client/Command/GetConfig.cc @@ -64,7 +64,7 @@ namespace snapper void Command::GetConfig::run() { - if (_options_parser.hasArgs()) + if (_options_parser.has_args()) { cerr << _("Command 'get-config' does not take arguments.") << endl; exit(EXIT_FAILURE); diff --git a/client/Command/GetConfig/Options.cc b/client/Command/GetConfig/Options.cc index 7294d43c..fae5d74c 100644 --- a/client/Command/GetConfig/Options.cc +++ b/client/Command/GetConfig/Options.cc @@ -32,9 +32,8 @@ namespace snapper namespace { - const option OPTIONS[] = { - { "columns", required_argument, 0, 0}, - { 0, 0, 0, 0 } + const vector