summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2017-01-20 14:54:47 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-20 22:40:31 -0800
commita609478d1a1e9bc11a2122797ed4eb336d5dbdee (patch)
treeb1341da92313a4f37fc05ecb06a396c9345f0d88 /host
parent1a03740bb094585a6aeba7c1bd83077d5f219c9f (diff)
downloadvboot-a609478d1a1e9bc11a2122797ed4eb336d5dbdee.tar.gz
2lib: add VB2_DEBUG_RAW() to print without function name
Currently, VB2_DEBUG() will print the function name as a prefix to the debug output. Add VB2_DEBUG_RAW() to print without that, so that it's possible to print little bits of debug output. Use this in ec_sync to hex dump the hashes. And then clean up all of the debug calls which explicitly did things like: VB2_DEBUG("%s: foo", __func__); to just: VB2_DEBUG("foo"); so they don't double-print the function name BUG=chromium:683391 BRANCH=none TEST=build_packages --board=reef chromeos-firmware && DEBUG=1 make -j runtests CQ-DEPEND=CL:430978,CL:431111 Change-Id: I0c35519d2e670d55d65d01eaa60d61f3e3edf419 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/431171 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/lib/host_key.c2
-rw-r--r--host/lib/host_signature2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/host_key.c b/host/lib/host_key.c
index 499fe2d0..52845c03 100644
--- a/host/lib/host_key.c
+++ b/host/lib/host_key.c
@@ -32,7 +32,7 @@ int packed_key_looks_ok(const struct vb2_packed_key *key, uint32_t size)
if (key->key_version > VB2_MAX_KEY_VERSION) {
/* Currently, TPM only supports 16-bit version */
- VB2_DEBUG("%s() - packed key invalid version\n", __func__);
+ fprintf(stderr, "%s() packed key invalid version\n", __func__);
return 0;
}
diff --git a/host/lib/host_signature2.c b/host/lib/host_signature2.c
index a9d0f44f..6baff961 100644
--- a/host/lib/host_signature2.c
+++ b/host/lib/host_signature2.c
@@ -125,7 +125,7 @@ struct vb2_signature *vb2_calculate_signature(
free(signature_digest);
if (-1 == rv) {
- VB2_DEBUG("%s: RSA_private_encrypt() failed.\n", __func__);
+ fprintf(stderr, "%s: RSA_private_encrypt() failed\n", __func__);
free(sig);
return NULL;
}