aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mentovai <mark@chromium.org>2019-06-18 10:31:28 -0400
committerMark Mentovai <mark@chromium.org>2019-06-18 14:48:57 +0000
commit9575315d8b2cc4b4f1b011723a38f0a180123959 (patch)
treee19c2a7ff0d57f64f08c94093d8aad7e148f8eda
parentconfigure.ac: Workaround gtest-config not being installed. (diff)
downloadbreakpad-9575315d8b2cc4b4f1b011723a38f0a180123959.tar.xz
Mac upload_system_symbols: use log.Fatalf where formatting is desired
Change-Id: I5623da3109feeb4b80137fa67501b8fd7aa5c8ec Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1663995 Reviewed-by: Robert Sesek <rsesek@chromium.org>
-rw-r--r--src/tools/mac/upload_system_symbols/upload_system_symbols.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/mac/upload_system_symbols/upload_system_symbols.go b/src/tools/mac/upload_system_symbols/upload_system_symbols.go
index eab93ed5..0ff01a00 100644
--- a/src/tools/mac/upload_system_symbols/upload_system_symbols.go
+++ b/src/tools/mac/upload_system_symbols/upload_system_symbols.go
@@ -114,7 +114,7 @@ func main() {
if *dumpOnlyPath != "" {
// -dump-to specified, so make sure that the path is a directory.
if fi, err := os.Stat(*dumpOnlyPath); err != nil {
- log.Fatal("-dump-to location: %v", err)
+ log.Fatalf("-dump-to location: %v", err)
} else if !fi.IsDir() {
log.Fatal("-dump-to location is not a directory")
}
@@ -127,7 +127,7 @@ func main() {
uq = StartUploadQueue()
if p, err := ioutil.TempDir("", "upload_system_symbols"); err != nil {
- log.Fatal("Failed to create temporary directory: %v", err)
+ log.Fatalf("Failed to create temporary directory: %v", err)
} else {
dumpPath = p
defer os.RemoveAll(p)
@@ -266,7 +266,7 @@ func (dq *DumpQueue) worker() {
symfile := fmt.Sprintf("%s_%s.sym", filebase, req.arch)
f, err := os.Create(symfile)
if err != nil {
- log.Fatal("Error creating symbol file:", err)
+ log.Fatalf("Error creating symbol file: %v", err)
}
cmd := exec.Command(dumpSyms, "-a", req.arch, req.path)
@@ -288,13 +288,13 @@ func (dq *DumpQueue) worker() {
func uploadFromDirectory(directory string, uq *UploadQueue) {
d, err := os.Open(directory)
if err != nil {
- log.Fatal("Could not open directory to upload: %v", err)
+ log.Fatalf("Could not open directory to upload: %v", err)
}
defer d.Close()
entries, err := d.Readdirnames(0)
if err != nil {
- log.Fatal("Could not read directory: %v", err)
+ log.Fatalf("Could not read directory: %v", err)
}
for _, entry := range entries {
@@ -335,14 +335,14 @@ func findLibsInRoot(root string, dq *DumpQueue) {
func (fq *findQueue) findLibsInPath(loc string) {
d, err := os.Open(loc)
if err != nil {
- log.Fatal("Could not open %s: %v", loc, err)
+ log.Fatalf("Could not open %s: %v", loc, err)
}
defer d.Close()
for {
fis, err := d.Readdir(100)
if err != nil && err != io.EOF {
- log.Fatal("Error reading directory %s: %v", loc, err)
+ log.Fatalf("Error reading directory %s: %v", loc, err)
}
for _, fi := range fis {