summaryrefslogtreecommitdiff
path: root/svr-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-10-28 21:37:35 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-10-28 21:37:35 +0800
commitab42349ab59a06117e2fce1a90f7f594b4e3f8d5 (patch)
treeba85719c4462e1c36f486b0d94712f41054798ed /svr-runopts.c
parentddc1c3250628cb686d33f2e4fc998f186f31be01 (diff)
downloaddropbear-ab42349ab59a06117e2fce1a90f7f594b4e3f8d5.tar.gz
Warn rather than fail if flags have trailing parts
Diffstat (limited to 'svr-runopts.c')
-rw-r--r--svr-runopts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/svr-runopts.c b/svr-runopts.c
index acb7cc1..26c199b 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -191,8 +191,9 @@ void svr_getopts(int argc, char ** argv) {
if (argv[i][0] == '-') {
char c = argv[i][1];
if (strlen(argv[i]) != 2) {
- /* Ensure only one flag per hyphen. '?' falls through to print help */
- c = '?';
+ /* We only handle one flag per hyphen */
+ fprintf(stderr, "Warning, trailing '%s' of '%s' is ignored.\n",
+ &argv[i][2], argv[i]);
}
switch (c) {
case 'b':