summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-09-18 11:45:22 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-09-18 13:00:59 +0200
commit59b387bb38e6b434d572d17c744cd0a48647c8af (patch)
tree00170e2459fe295a16db36a096fd5007da6150f1
parent5ec384676ae938dbe6281c98ebb26b821cdf8fea (diff)
downloadcanutils-59b387bb38e6b434d572d17c744cd0a48647c8af.tar.gz
cansequence: exit with failure in case of unknown option
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--src/cansequence.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cansequence.c b/src/cansequence.c
index 1e1af29..6fa3abb 100644
--- a/src/cansequence.c
+++ b/src/cansequence.c
@@ -281,7 +281,8 @@ int main(int argc, char **argv)
break;
default:
- fprintf(stderr, "Unknown option %c\n", opt);
+ print_usage(basename(argv[0]));
+ exit(EXIT_FAILURE);
break;
}
}