diff options
author | Randall Spangler <rspangler@chromium.org> | 2017-01-03 13:49:18 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-12 15:56:27 -0800 |
commit | 21015898b39aa8742057ed6e6423c308c8d0a15d (patch) | |
tree | 8221b6a48e13d8cdf15820cc92247167f8ac5fe0 /firmware/stub | |
parent | df4eb2bb7be9d61bfe9bdf6c33f836f358b18cf6 (diff) | |
download | vboot-21015898b39aa8742057ed6e6423c308c8d0a15d.tar.gz |
firmware: replace VBDEBUG(()) macro with VB2_DEBUG()
The original VBDEBUG macro used doubly-nested parens to work with
MSVC, which didn't support varargs in macros. We now only use more
modern compilers, so replace it with the VB2_DEBUG macro and get rid
of the ugly and fragile double parens.
BUG=chromium:611535
BRANCH=none
TEST=make runtests; build_packages --board=reef chromeos-firmware
Change-Id: Ifc0cb0733b14daaa1fde095fab7da4215a538c77
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/425133
Reviewed-by: Shelley Chen <shchen@chromium.org>
Diffstat (limited to 'firmware/stub')
-rw-r--r-- | firmware/stub/tpm_lite_stub.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/firmware/stub/tpm_lite_stub.c b/firmware/stub/tpm_lite_stub.c index 71bf73cd..97eebd0f 100644 --- a/firmware/stub/tpm_lite_stub.c +++ b/firmware/stub/tpm_lite_stub.c @@ -8,6 +8,9 @@ #include <stdint.h> +#include "2sysincludes.h" +#include "2common.h" + #include "tlcl.h" #include "tlcl_internal.h" #include "utility.h" @@ -176,8 +179,8 @@ VbError_t VbExTpmOpen(void) if (saved_errno != EBUSY) break; - VBDEBUG(("TPM: retrying %s: %s\n", - device_path, strerror(errno))); + VB2_DEBUG("TPM: retrying %s: %s\n", + device_path, strerror(errno)); /* Stall until TPM comes back. */ delay.tv_sec = 0; @@ -216,7 +219,7 @@ VbError_t VbExTpmSendReceive(const uint8_t* request, uint32_t request_length, #ifdef VBOOT_DEBUG struct timeval before, after; - VBDEBUG(("request (%d bytes):\n", request_length)); + VB2_DEBUG("request (%d bytes):\n", request_length); DbgPrintBytes(request, request_length); gettimeofday(&before, NULL); #endif @@ -227,11 +230,11 @@ VbError_t VbExTpmSendReceive(const uint8_t* request, uint32_t request_length, #ifdef VBOOT_DEBUG gettimeofday(&after, NULL); - VBDEBUG(("response (%d bytes):\n", *response_length)); + VB2_DEBUG("response (%d bytes):\n", *response_length); DbgPrintBytes(response, *response_length); - VBDEBUG(("execution time: %dms\n", - (int) ((after.tv_sec - before.tv_sec) * 1000 + - (after.tv_usec - before.tv_usec) / 1000))); + VB2_DEBUG("execution time: %dms\n", + (int) ((after.tv_sec - before.tv_sec) * 1000 + + (after.tv_usec - before.tv_usec) / 1000)); #endif #ifndef NDEBUG |