Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: src/platform/vboot_reference/misclibs/file_keys.c

Issue 1607006: VBoot Reference: Output debug information using debug() instead of fprintf(). (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/misclibs/file_keys.c
diff --git a/src/platform/vboot_reference/misclibs/file_keys.c b/src/platform/vboot_reference/misclibs/file_keys.c
index 275ca6b7cf25f65db06862136586de9569dfc30d..de2821641be3c835ca443ca47961a44e6c0618b0 100644
--- a/src/platform/vboot_reference/misclibs/file_keys.c
+++ b/src/platform/vboot_reference/misclibs/file_keys.c
@@ -25,12 +25,12 @@ uint8_t* BufferFromFile(const char* input_file, uint64_t* len) {
uint8_t* buf = NULL;
if ((fd = open(input_file, O_RDONLY)) == -1) {
- fprintf(stderr, "Couldn't open file.\n");
+ debug("Couldn't open file.\n");
return NULL;
}
if (-1 == fstat(fd, &stat_fd)) {
- fprintf(stderr, "Couldn't stat key file\n");
+ debug("Couldn't stat key file\n");
return NULL;
}
*len = stat_fd.st_size;
@@ -41,7 +41,7 @@ uint8_t* BufferFromFile(const char* input_file, uint64_t* len) {
return NULL;
if (*len != read(fd, buf, *len)) {
- fprintf(stderr, "Couldn't read key into a buffer.\n");
+ debug("Couldn't read key into a buffer.\n");
return NULL;
}
@@ -103,13 +103,13 @@ uint8_t* SignatureFile(const char* input_file, const char* key_file,
cmd_out = popen(cmd, "r");
Free(cmd);
if (!cmd_out) {
- fprintf(stderr, "Couldn't execute: %s\n", cmd);
+ debug("Couldn't execute: %s\n", cmd);
return NULL;
}
signature = (uint8_t*) Malloc(signature_size);
if (fread(signature, signature_size, 1, cmd_out) != 1) {
- fprintf(stderr, "Couldn't read signature.\n");
+ debug("Couldn't read signature.\n");
pclose(cmd_out);
Free(signature);
return NULL;
« no previous file with comments | « src/platform/vboot_reference/cryptolib/Makefile ('k') | src/platform/vboot_reference/misclibs/signature_digest.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698