mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
Consistencely allow '-?' to get a help text.
This commit is contained in:
@@ -182,7 +182,7 @@ int main(int argc, char **argv)
|
||||
int data[8];
|
||||
int i, found, opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "I:O:v")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "I:O:v?")) != -1) {
|
||||
switch (opt) {
|
||||
case 'I':
|
||||
infile = fopen(optarg, "r");
|
||||
@@ -204,6 +204,11 @@ int main(int argc, char **argv)
|
||||
verbose = 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