From 9d2079df684b3ee0e860e1b9076755e3d06428a6 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 1 Feb 2016 06:54:55 -0800 Subject: [PATCH] SERIAL: Fix extra probes to start at 0. --- sim_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim_serial.c b/sim_serial.c index 123f70e2..2cce47bf 100644 --- a/sim_serial.c +++ b/sim_serial.c @@ -974,7 +974,7 @@ for (i=1; (ports < max) && (i < 64); ++i) { close (port); } } -for (i=1; (ports < max) && (i < 64); ++i) { +for (i=0; (ports < max) && (i < 64); ++i) { sprintf (list[ports].name, "/dev/tty%02d", i); port = open (list[ports].name, O_RDWR | O_NOCTTY | O_NONBLOCK); /* open the port */ if (port != -1) { /* open OK? */ @@ -983,7 +983,7 @@ for (i=1; (ports < max) && (i < 64); ++i) { close (port); } } -for (i=1; (ports < max) && (i < 8); ++i) { +for (i=0; (ports < max) && (i < 8); ++i) { sprintf (list[ports].name, "/dev/ttyU%d", i); port = open (list[ports].name, O_RDWR | O_NOCTTY | O_NONBLOCK); /* open the port */ if (port != -1) { /* open OK? */