Remove feature to quit the isotptun by keypress (from stdin) as it was not possible...
[profile/ivi/can-utils.git] / asc2log.c
index fffce6e..e6f82d3 100644 (file)
--- a/asc2log.c
+++ b/asc2log.c
@@ -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]));