VBoot Reference: Output debug information using debug() instead of fprintf().
This should make it easier to switch off debug messages if needed.
TESTS=builds fine, autotest builds fine (using both arm/x86-generic)
Review URL: http://codereview.chromium.org/1607006
diff --git a/common/rollback_index.c b/common/rollback_index.c
index c107f8e..0c6fd0c 100644
--- a/common/rollback_index.c
+++ b/common/rollback_index.c
@@ -9,9 +9,9 @@
#include "rollback_index.h"
#include <stdint.h>
-#include <stdio.h>
#include <tss/tcs.h>
+#include "utility.h"
#include "tlcl.h"
uint16_t g_firmware_key_version = 0;
@@ -23,7 +23,7 @@
uint16_t zero = 0;
uint32_t perm = TPM_NV_PER_WRITE_STCLEAR | TPM_NV_PER_PPWRITE;
- fprintf(stderr, "Initializing spaces\n");
+ debug("Initializing spaces\n");
TlclSetNvLocked(); /* useful only the first time */
TlclDefineSpace(FIRMWARE_KEY_VERSION_NV_INDEX, perm, sizeof(uint16_t));
@@ -78,7 +78,7 @@
TlclSelftestfull();
TlclAssertPhysicalPresence();
if (!GetTPMRollbackIndices()) {
- fprintf(stderr, "Ho Ho Ho! We must jump to recovery.");
+ debug("Ho Ho Ho! We must jump to recovery.");
EnterRecovery();
}
}