Added a -E switch to the SHOW DEVICE/SHOW CONFIG/SHOW FEATURES command to only display Enabled devices
This commit is contained in:
parent
76fccce27d
commit
cf59910128
1 changed files with 4 additions and 2 deletions
6
scp.c
6
scp.c
|
@ -2857,12 +2857,14 @@ t_stat show_config (FILE *st, DEVICE *dnotused, UNIT *unotused, int32 flag, char
|
|||
{
|
||||
int32 i;
|
||||
DEVICE *dptr;
|
||||
t_bool only_enabled = (sim_switches & SWMASK ('E'));
|
||||
|
||||
if (cptr && (*cptr != 0))
|
||||
return SCPE_2MARG;
|
||||
fprintf (st, "%s simulator configuration\n\n", sim_name);
|
||||
fprintf (st, "%s simulator configuration%s\n\n", sim_name, only_enabled ? " (enabled devices)" : "");
|
||||
for (i = 0; (dptr = sim_devices[i]) != NULL; i++)
|
||||
show_device (st, dptr, flag);
|
||||
if (!only_enabled || !qdisable (dptr))
|
||||
show_device (st, dptr, flag);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue