summaryrefslogtreecommitdiff
path: root/util/ecst.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2015-09-18 11:01:43 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-18 16:34:18 -0700
commitd79b54fdd9e5cfc1d5c46c41af9e0701f90fb576 (patch)
treec05f895c6b3294be29cb08a7bc7e1033cd1b7f7f /util/ecst.c
parent3c862e7f39506100d5bd8258ce744bfe67374c5f (diff)
downloadchrome-ec-d79b54fdd9e5cfc1d5c46c41af9e0701f90fb576.tar.gz
ecst: Print errors to stderr.
This commit makes all prints with the TERR error level print to standard error so that it's more obvious what's wrong when an error occurs. BUG=None BRANCH=None TEST=Checkout tree @ 5dfe8d2. Build npcx_evb and see that the error is displayed during the build process. TEST=make buildall tests Change-Id: I4117dd83a9a85ae81baf533302b0b70f4da174bc Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/300613 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util/ecst.c')
-rwxr-xr-xutil/ecst.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/ecst.c b/util/ecst.c
index b356e3469f..9a6632c71a 100755
--- a/util/ecst.c
+++ b/util/ecst.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 The Chromium OS Authors. All rights reserved.
+ * Copyright 2015 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -880,7 +880,10 @@ void my_printf(int error_level, char *fmt, ...)
if ((error_level == TDBG) && (g_verbose != SUPER_VERBOSE))
return;
- printf("%s", buffer);
+ if (error_level == TERR)
+ fprintf(stderr, "%s", buffer);
+ else
+ printf("%s", buffer);
}
/*