Author: mmacy
Date: Sat May 19 18:15:41 2018
New Revision: 333882
URL: https://svnweb.freebsd.org/changeset/base/333882

Log:
  bhnd nvram map: don't write "variable records written" to standard out by 
default
  
  Add -v (verbose) option for the developers. The rest of us
  derive no value from this information.

Modified:
  head/sys/dev/bhnd/tools/nvram_map_gen.awk

Modified: head/sys/dev/bhnd/tools/nvram_map_gen.awk
==============================================================================
--- head/sys/dev/bhnd/tools/nvram_map_gen.awk   Sat May 19 18:02:46 2018        
(r333881)
+++ head/sys/dev/bhnd/tools/nvram_map_gen.awk   Sat May 19 18:15:41 2018        
(r333882)
@@ -56,6 +56,7 @@ function main(_i) {
        OUT_T = null
        OUT_T_HEADER = "HEADER"
        OUT_T_DATA = "DATA"
+       VERBOSE = 0
 
        # Tab width to use when calculating output alignment
        TAB_WIDTH = 8
@@ -77,6 +78,8 @@ function main(_i) {
                        OUT_T = OUT_T_DATA
                } else if (ARGV[_i] == "-h" && OUT_T == null) {
                        OUT_T = OUT_T_HEADER
+               } else if (ARGV[_i] == "-v") {
+                       VERBOSE = 1
                } else if (ARGV[_i] == "-o") {
                        _i++
                        if (_i >= ARGC)
@@ -488,9 +491,10 @@ function at_exit(_block_start, _state, _output_vars, _
        } else if (OUT_T == OUT_T_HEADER) {
                write_header(_output_vars)
        }
-
-       printf("%u variable records written to %s\n", array_size(_output_vars),
-           OUTPUT_FILE) >> "/dev/stderr"
+       if (VERBOSE == 1) {
+               printf("%u variable records written to %s\n", 
array_size(_output_vars),
+                      OUTPUT_FILE) >> "/dev/stderr"
+       }
 }
 
 # Write the public header (output type HEADER)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to