From a01e2c73e9e9110a728ef997d18ed00834f1ca5a Mon Sep 17 00:00:00 2001 From: Dave Frodin Date: Mon, 6 May 2013 15:51:39 -0600 Subject: [PATCH] BACKPORT: cbfs_core.c: make cfbs searches even less verbose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cbfs core code would print out the name of the file it is searching for and when it is found would print out the name again. This contributes to a lot of unnecessary messages in a functioning payload’s output. Change this message to a DEBUG one so that it will only be printed when CONFIG_DEBUG_CBFS is enabled. BUG=None BRANCH=None TEST=Compiled and booted. Change-Id: I142166bfdfcb5e7f6dba6c1ecbd13f3c0ff15088 Signed-off-by: Dave Frodin Reviewed-on: https://gerrit.chromium.org/gerrit/50459 Reviewed-by: Stefan Reinauer Commit-Queue: Aaron Durbin Tested-by: Aaron Durbin --- payloads/libpayload/libcbfs/cbfs_core.c | 6 +++--- src/lib/cbfs_core.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/payloads/libpayload/libcbfs/cbfs_core.c b/payloads/libpayload/libcbfs/cbfs_core.c index 3fe6971f1d..48a4b3aaca 100644 --- a/payloads/libpayload/libcbfs/cbfs_core.c +++ b/payloads/libpayload/libcbfs/cbfs_core.c @@ -123,7 +123,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) #endif DEBUG("CBFS location: 0x%x~0x%x, align: %d\n", offset, romsize, align); - LOG("Looking for '%s' starting from 0x%x.\n", name, offset); + DEBUG("Looking for '%s' starting from 0x%x.\n", name, offset); media->open(media); while (offset < romsize && media->read(media, &file, offset, sizeof(file)) == sizeof(file)) { @@ -150,7 +150,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) } else if (strcmp(file_name, name) == 0) { int file_offset = ntohl(file.offset), file_len = ntohl(file.len); - LOG("Found file (offset=0x%x, len=%d).\n", + DEBUG("Found file (offset=0x%x, len=%d).\n", offset + file_offset, file_len); media->unmap(media, file_name); file_ptr = media->map(media, offset, @@ -169,7 +169,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) offset += align - (offset % align); } media->close(media); - LOG("WARNING: Not found.\n"); + LOG("WARNING: '%s' not found.\n", name); return NULL; } diff --git a/src/lib/cbfs_core.c b/src/lib/cbfs_core.c index 1220d482d1..852b37fcdf 100644 --- a/src/lib/cbfs_core.c +++ b/src/lib/cbfs_core.c @@ -123,7 +123,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) #endif DEBUG("CBFS location: 0x%x~0x%x, align: %d\n", offset, romsize, align); - LOG("Looking for '%s' starting from 0x%x.\n", name, offset); + DEBUG("Looking for '%s' starting from 0x%x.\n", name, offset); media->open(media); while (offset < romsize && media->read(media, &file, offset, sizeof(file)) == sizeof(file)) { @@ -150,7 +150,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) } else if (strcmp(file_name, name) == 0) { int file_offset = ntohl(file.offset), file_len = ntohl(file.len); - LOG("Found file (offset=0x%x, len=%d).\n", + DEBUG("Found file (offset=0x%x, len=%d).\n", offset + file_offset, file_len); media->unmap(media, file_name); file_ptr = media->map(media, offset, @@ -169,7 +169,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name) offset += align - (offset % align); } media->close(media); - LOG("WARNING: Not found.\n"); + LOG("WARNING: '%s' not found.\n", name); return NULL; }