From baced535e32689a7b340623747c111c4e2e43c93 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 28 Oct 2020 23:55:24 -0500 Subject: [PATCH] Add -v (verbose) flag to softIoc Only display the startup steps taken if -v was given. Show each step *before* running it, so error messages follow it. --- modules/database/src/std/softIoc/softMain.cpp | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/modules/database/src/std/softIoc/softMain.cpp b/modules/database/src/std/softIoc/softMain.cpp index e38e7b8e8..97e0a9f4a 100644 --- a/modules/database/src/std/softIoc/softMain.cpp +++ b/modules/database/src/std/softIoc/softMain.cpp @@ -47,13 +47,15 @@ extern "C" int softIoc_registerRecordDeviceDriver(struct dbBase *pdbbase); namespace { +bool verbose = false; + static void exitSubroutine(subRecord *precord) { epicsExitLater((precord->a == 0.0) ? EXIT_SUCCESS : EXIT_FAILURE); } void usage(const char *arg0, const std::string& base_dbd) { std::cout<<"Usage: "< Access Security configuration file. Macro substitution is\n" " performed.\n" "\n" @@ -103,12 +107,14 @@ void lazy_dbd(const std::string& dbd_file) { if(lazy_dbd_loaded) return; lazy_dbd_loaded = true; + if (verbose) + std::cout<<"dbLoadDatabase(\""<