aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-12 17:31:01 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-06-12 17:34:56 +0200
commit52fea0cd81a0511113aed5b194b0b87b8b6a37de (patch)
tree038934ebd7f0e3dc9f4a158c657651c5897e1f1b
parent2d7ee14533fa5be65f9a6fbedab18ecf0cd4f748 (diff)
osmo-bsc main: exit on cmdline option errorneels/vtyref
-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);
}
}