diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-06-12 17:31:01 +0200 |
---|---|---|
committer | neels <nhofmeyr@sysmocom.de> | 2020-06-16 10:16:30 +0000 |
commit | 83bba52b5c05a7a387675a48309b2a14eeafb188 (patch) | |
tree | 1beaaf6d03e336ca17a501492447adad6680da22 /src | |
parent | 10983f206ba2d58424bd829c73ebc1ac7e9e7c0b (diff) |
osmo-bsc main: exit on cmdline option error
Change-Id: I7c3432790a77ae9081d2c458ee9f598e435e089d
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_main.c | 5 |
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); } } |