aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-12 17:31:01 +0200
committerneels <nhofmeyr@sysmocom.de>2020-06-16 10:16:30 +0000
commit83bba52b5c05a7a387675a48309b2a14eeafb188 (patch)
tree1beaaf6d03e336ca17a501492447adad6680da22 /src
parent10983f206ba2d58424bd829c73ebc1ac7e9e7c0b (diff)
osmo-bsc main: exit on cmdline option error
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/osmo_bsc_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 0e5b4e6fa..9eaaf2a7a 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -173,8 +173,9 @@ static void handle_options(int argc, char **argv)
rf_ctrl = optarg;
break;
default:
- /* ignore */
- break;
+ /* catch unknown options *as well as* missing arguments. */
+ fprintf(stderr, "Error in command line options. Exiting.\n");
+ exit(-1);
}
}