From e87d40c60091525098fe185baa42390ad45f0fb8 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 17 Dec 2014 20:21:17 -0800 Subject: [PATCH] SCP: Add a -Q option to ATTACH -R and ATTACH -N to suppress success status messages. From Dave Bryan --- scp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scp.c b/scp.c index 77e1a85c..efe26c46 100644 --- a/scp.c +++ b/scp.c @@ -860,6 +860,9 @@ static const char simh_help[] = " as paper-tape readers, and devices with write lock switches, such as disks\n" " and tapes, support read only operation; other devices do not. If a file is\n" " attached read only, its contents can be examined but not modified.\n" + "5-q\n" + " If the -q switch is specified when creating a new file (-n) or opening one\n" + " read only (-r), the message announcing this fact is suppressed.\n" "5-f\n" " For simulated magnetic tapes, the ATTACH command can specify the format of\n" " the attached tape image file:\n\n" @@ -5040,7 +5043,7 @@ if (sim_switches & SWMASK ('R')) { /* read only? */ if (uptr->fileref == NULL) /* open fail? */ return attach_err (uptr, SCPE_OPENERR); /* yes, error */ uptr->flags = uptr->flags | UNIT_RO; /* set rd only */ - if (!sim_quiet) { + if (!sim_quiet && !(sim_switches & SWMASK ('Q'))) { sim_printf ("%s: unit is read only\n", sim_dname (dptr)); } } @@ -5049,7 +5052,7 @@ else { uptr->fileref = sim_fopen (cptr, "wb+"); /* open new file */ if (uptr->fileref == NULL) /* open fail? */ return attach_err (uptr, SCPE_OPENERR); /* yes, error */ - if (!sim_quiet) { + if (!sim_quiet && !(sim_switches & SWMASK ('Q'))) { sim_printf ("%s: creating new file\n", sim_dname (dptr)); } }