aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-03 21:41:13 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-03 21:41:38 +0100
commit501d053b70ea8ed0aa9e0f6d57d403e982afe2ec (patch)
tree491e01308918e583146433ffbfe3d3aab3f28a92 /Transceiver52M
parent0fafe03199e6d5d02af894b5d29f394a7c9c821d (diff)
trx: exit() on unsupported positional arguments on command line
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/osmo-trx.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 2346488..16047a9 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -381,6 +381,11 @@ static void handle_options(int argc, char **argv, struct trx_ctx* trx)
}
}
+ if (argc > optind) {
+ LOG(ERROR) << "Unsupported positional arguments on command line";
+ goto bad_config;
+ }
+
/* Cmd line option specific validation & setup */
if (trx->cfg.num_chans > TRX_CHAN_MAX) {