Add --device/-D support to the command line tools and manuals
[fw/altos] / ao-tools / ao-dbg / ao-dbg-main.c
index f1e2c11199122a5ca4b1ca5b19a5c59fb7f839b7..21b83a3dbc2b6c01327f05fe1e72ae59111b400a 100644 (file)
@@ -34,6 +34,7 @@ struct ccdbg *s51_dbg;
 int s51_interrupted = 0;
 int s51_monitor = 0;
 char *s51_tty = NULL;
+char *s51_device = NULL;
 
 static FILE *s51_input;
 static FILE *s51_output;
@@ -52,6 +53,7 @@ void s51_sigint()
 
 static const struct option options[] = {
        { .name = "tty", .has_arg = 1, .val = 'T' },
+       { .name = "device", .has_arg = 1, .val = 'D' },
        { 0, 0, 0, 0 },
 };
 
@@ -114,6 +116,9 @@ main(int argc, char **argv)
                case 'T':
                        s51_tty = optarg;
                        break;
+               case 'D':
+                       s51_device = optarg;
+                       break;
                }
        }
        if (s51_port) {