1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-25 19:57:36 +00:00

Added scp SHOW SERIAL command

Fixed Ethernet formatting of open device names
Fixed serial generic naming to accomodate for the fact that an OS list of serial devices might not include devices which are already opened.
This commit is contained in:
Mark Pizzolato
2012-04-25 17:04:48 -07:00
parent 7929c11792
commit c77bdb20f1
5 changed files with 168 additions and 50 deletions

View File

@@ -702,7 +702,7 @@ t_stat eth_show (FILE* st, UNIT* uptr, int32 val, void* desc)
for (i=0, min=0; i<number; i++)
if ((len = strlen(list[i].name)) > min) min = len;
for (i=0; i<number; i++)
fprintf(st," %2d %-*s (%s)\n", i, (int)min, list[i].name, list[i].desc);
fprintf(st," eth%d\t%-*s (%s)\n", i, (int)min, list[i].name, list[i].desc);
}
if (eth_open_device_count) {
int i;
@@ -712,9 +712,9 @@ t_stat eth_show (FILE* st, UNIT* uptr, int32 val, void* desc)
for (i=0; i<eth_open_device_count; i++) {
d = eth_getdesc_byname(eth_open_devices[i]->name, desc);
if (d)
fprintf(st, " %-7s%s (%s)\n", eth_open_devices[i]->dptr->name, eth_open_devices[i]->name, d);
fprintf(st, " %-7s%s (%s)\n", eth_open_devices[i]->dptr->name, eth_open_devices[i]->dptr->units[0].filename, d);
else
fprintf(st, " %-7s%s\n", eth_open_devices[i]->dptr->name, eth_open_devices[i]->name);
fprintf(st, " %-7s%s\n", eth_open_devices[i]->dptr->name, eth_open_devices[i]->dptr->units[0].filename);
}
}
return SCPE_OK;