1
0
mirror of https://github.com/simh/simh.git synced 2026-04-02 20:17:30 +00:00

SERIAL: Fix extra probes to start at 0.

This commit is contained in:
Mark Pizzolato
2016-02-01 06:54:55 -08:00
parent de72cba08b
commit 9d2079df68

View File

@@ -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? */