Get env var for debug method selection
authorKeith Packard <keithp@keithp.com>
Fri, 17 Apr 2009 17:11:11 +0000 (10:11 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 17 Apr 2009 17:11:11 +0000 (10:11 -0700)
ccdump/ccdump.c

index 5a5ce11c20a14c6e3f82a6d3be90207327c091a9..399732d9f1fea9b9b7e230ac782c52943035d440 100644 (file)
@@ -31,8 +31,10 @@ main (int argc, char **argv)
        uint8_t         *b;
        int             i, j;
        uint32_t        addr;
+       char            *tty;
 
-       cc = cc_usb_open();
+       tty = getenv("CCDBG_TTY");
+       cc = cc_usb_open(tty);
        for (block = 0; block < NUM_BLOCK; block++) {
                cc_queue_read(cc, bytes, sizeof (bytes));
                cc_usb_printf(cc, "e %x\n", block);