mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-01 20:43:47 +00:00
gtphub: complain about excess cmdline args.
Sponsored-by: On-Waves ehi
This commit is contained in:
@@ -176,8 +176,15 @@ static void handle_options(struct cmdline_cfg *ccfg, int argc, char **argv)
|
|||||||
|
|
||||||
c = getopt_long(argc, argv, "hd:Dc:sTe:",
|
c = getopt_long(argc, argv, "hd:Dc:sTe:",
|
||||||
long_options, &option_index);
|
long_options, &option_index);
|
||||||
if (c == -1)
|
if (c == -1) {
|
||||||
|
if (optind < argc) {
|
||||||
|
LOGP(DGTPHUB, LOGL_FATAL,
|
||||||
|
"Excess commandline arguments ('%s').\n",
|
||||||
|
argv[optind]);
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'h':
|
case 'h':
|
||||||
|
|||||||
Reference in New Issue
Block a user