SCP: Add ability to display device description if -D specified on SHOW DEVICE
The SHOW FEATURES will enumerate all devices in a simulator and for each of them display the device specific description if one is available. This change allows the description to be optionally visible for a single device displayed with SHOW DEVICE.
This commit is contained in:
parent
1af590d806
commit
576f5b39e5
1 changed files with 6 additions and 0 deletions
6
scp.c
6
scp.c
|
@ -4197,6 +4197,10 @@ fprintf (st, "%s", sim_dname (dptr)); /* print dev name */
|
|||
if ((flag == 2) && dptr->description) {
|
||||
fprintf (st, "\t%s\n", dptr->description(dptr));
|
||||
}
|
||||
else {
|
||||
if ((sim_switches & SWMASK ('D')) && dptr->description)
|
||||
fprintf (st, "\t%s\n", dptr->description(dptr));
|
||||
}
|
||||
if (qdisable (dptr)) { /* disabled? */
|
||||
fprintf (st, "\tdisabled\n");
|
||||
return SCPE_OK;
|
||||
|
@ -7659,6 +7663,8 @@ DEVICE *find_dev (const char *cptr)
|
|||
int32 i;
|
||||
DEVICE *dptr;
|
||||
|
||||
if (cptr == NULL)
|
||||
return NULL;
|
||||
for (i = 0; (dptr = sim_devices[i]) != NULL; i++) {
|
||||
if ((strcmp (cptr, dptr->name) == 0) ||
|
||||
(dptr->lname &&
|
||||
|
|
Loading…
Add table
Reference in a new issue