diff options
author | David Benjamin <davidben@google.com> | 2016-04-18 22:39:33 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2016-04-18 22:42:15 +0300 |
commit | 56703d91bf18f66867ed7f3fc8ed06fbf13fb18a (patch) | |
tree | 9aaf2c1396d232b72dc14e446755ce04c7a710db /crypto/err | |
parent | 26993ad55eda0763990fdd11db929043761b56e1 (diff) |
Make err_data_generator.go silent by default.
I don't think I ever look at that output. This way our builds are nice and
silent.
Change-Id: Idb215e3702f530a8b8661622c726093530885c91
Reviewed-on: https://boringssl-review.googlesource.com/7700
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err_data_generate.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/err/err_data_generate.go b/crypto/err/err_data_generate.go index 24e0d66f..893ebffe 100644 --- a/crypto/err/err_data_generate.go +++ b/crypto/err/err_data_generate.go @@ -18,6 +18,7 @@ import ( "bufio" "bytes" "errors" + "flag" "fmt" "io" "os" @@ -26,6 +27,8 @@ import ( "strings" ) +var verbose = flag.Bool("verbose", false, "If true, prints a status message at the end.") + // libraryNames must be kept in sync with the enum in err.h. The generated code // will contain static assertions to enforce this. var libraryNames = []string{ @@ -138,7 +141,9 @@ type stringWriter interface { func (st *stringList) WriteTo(out stringWriter, name string) { list := st.buildList() - fmt.Fprintf(os.Stderr, "%s: %d bytes of list and %d bytes of string data.\n", name, 4*len(list), len(st.stringData)) + if *verbose { + fmt.Fprintf(os.Stderr, "%s: %d bytes of list and %d bytes of string data.\n", name, 4*len(list), len(st.stringData)) + } values := "kOpenSSL" + name + "Values" out.WriteString("const uint32_t " + values + "[] = {\n") @@ -215,6 +220,8 @@ func (e *errorData) readErrorDataFile(filename string) error { } func main() { + flag.Parse() + e := &errorData{ reasons: newStringList(), libraryMap: make(map[string]uint32), |