mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-23 00:21:14 +02:00
Consistencely allow '-?' to get a help text.
This commit is contained in:
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
|
||||
FILE *outfile = stdout;
|
||||
static int maxdev, devno, i, crlf, d4, opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "I:O:4n")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "I:O:4n?")) != -1) {
|
||||
switch (opt) {
|
||||
case 'I':
|
||||
infile = fopen(optarg, "r");
|
||||
@@ -105,6 +105,11 @@ int main(int argc, char **argv)
|
||||
d4 = 1;
|
||||
break;
|
||||
|
||||
case '?':
|
||||
print_usage(basename(argv[0]));
|
||||
return 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unknown option %c\n", opt);
|
||||
print_usage(basename(argv[0]));
|
||||
|
||||
Reference in New Issue
Block a user