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
4
scp.c
4
scp.c
|
@ -2857,11 +2857,13 @@ t_stat show_config (FILE *st, DEVICE *dnotused, UNIT *unotused, int32 flag, char
|
||||||
{
|
{
|
||||||
int32 i;
|
int32 i;
|
||||||
DEVICE *dptr;
|
DEVICE *dptr;
|
||||||
|
t_bool only_enabled = (sim_switches & SWMASK ('E'));
|
||||||
|
|
||||||
if (cptr && (*cptr != 0))
|
if (cptr && (*cptr != 0))
|
||||||
return SCPE_2MARG;
|
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++)
|
for (i = 0; (dptr = sim_devices[i]) != NULL; i++)
|
||||||
|
if (!only_enabled || !qdisable (dptr))
|
||||||
show_device (st, dptr, flag);
|
show_device (st, dptr, flag);
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue