From 52fea0cd81a0511113aed5b194b0b87b8b6a37de Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 12 Jun 2020 17:31:01 +0200 Subject: osmo-bsc main: exit on cmdline option error Change-Id: I7c3432790a77ae9081d2c458ee9f598e435e089d --- src/osmo-bsc/osmo_bsc_main.c | 5 +++-- 1 file 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); } } -- cgit v1.2.3