mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
cansequence: also show help for option "-?"
This avoids the "invalid option" error message in the auto generated man pages. | DESCRIPTION | ./cansequence: invalid option -- '?'
This commit is contained in:
+2
-1
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
|
|||||||
{ 0, 0, 0, 0 },
|
{ 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
while ((opt = getopt_long(argc, argv, "ei:pq::rvh", long_options, NULL)) != -1) {
|
while ((opt = getopt_long(argc, argv, "ei:pq::rvh?", long_options, NULL)) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'e':
|
case 'e':
|
||||||
extended = true;
|
extended = true;
|
||||||
@@ -312,6 +312,7 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
|
case '?':
|
||||||
print_usage(basename(argv[0]));
|
print_usage(basename(argv[0]));
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user