Added a -E switch to the SHOW DEVICE/SHOW CONFIG/SHOW FEATURES command to only display Enabled devices

This commit is contained in:
Mark Pizzolato 2013-05-17 02:54:19 -07:00
parent 76fccce27d
commit cf59910128

6
scp.c
View file

@ -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;
}