1
0
mirror of https://github.com/simh/simh.git synced 2026-02-27 01:00:07 +00:00

SCP: Include unit based logical names in SHOW NAMES output

This commit is contained in:
Mark Pizzolato
2022-07-01 09:39:52 -10:00
parent 3aa8b5da91
commit fb4c3ee653

14
scp.c
View File

@@ -7008,10 +7008,20 @@ return SCPE_OK;
t_stat show_dev_logicals (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, CONST char *cptr)
{
uint32 u;
t_bool found = FALSE;
for (u = 0; u < dptr->numunits; u++) {
if (dptr->units[u].lname) {
found = TRUE;
fprintf (st, "%s -> %s%u\n", dptr->units[u].lname, dptr->name, u);
}
}
if (dptr->lname)
fprintf (st, "%s -> %s\n", dptr->lname, dptr->name);
else if (!flag)
fputs ("no logical name assigned\n", st);
else
if ((!flag) && (!found))
fputs ("no logical name assigned\n", st);
return SCPE_OK;
}