From cf59910128b35902c40bac0c9e375e712b90d070 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 17 May 2013 02:54:19 -0700 Subject: [PATCH] Added a -E switch to the SHOW DEVICE/SHOW CONFIG/SHOW FEATURES command to only display Enabled devices --- scp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scp.c b/scp.c index cde6982c..555e5e00 100644 --- a/scp.c +++ b/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; }