diff options
| author | Matt Macy <mmacy@FreeBSD.org> | 2018-05-19 18:15:41 +0000 |
|---|---|---|
| committer | Matt Macy <mmacy@FreeBSD.org> | 2018-05-19 18:15:41 +0000 |
| commit | 4f4eb606dd25861c25d8da8010e347b28fae7c5d (patch) | |
| tree | 26cafe2de43b423ea206d0015519861a4a6f8941 /sys | |
| parent | f344fb0b4b733946a263a06b9e8925907e1e2402 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rwxr-xr-x | sys/dev/bhnd/tools/nvram_map_gen.awk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/bhnd/tools/nvram_map_gen.awk b/sys/dev/bhnd/tools/nvram_map_gen.awk index 469071df5b66..29061691105f 100755 --- a/sys/dev/bhnd/tools/nvram_map_gen.awk +++ b/sys/dev/bhnd/tools/nvram_map_gen.awk @@ -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, _noutput_vars, _name, _var, } 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) |
