aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-03 22:29:26 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-03 22:29:26 +0100
commit8984bea4619a4d23fc87558042ab96485d520fea (patch)
tree757020d805c7140db4fb3562e3971b039fd17e54
parentebbfbbdbc7e3afad39b316dcac9cc2da54c41122 (diff)
exit(2) on unsupported positional arguments on command line
-rw-r--r--src/osysmon_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osysmon_main.c b/src/osysmon_main.c
index 07a065e..206246c 100644
--- a/src/osysmon_main.c
+++ b/src/osysmon_main.c
@@ -197,6 +197,11 @@ static void handle_options(int argc, char **argv)
break;
}
}
+
+ if (argc > optind) {
+ fprintf(stderr, "Unsupported positional arguments on command line\n");
+ exit(2);
+ }
}
static struct osmo_timer_list print_timer;