Shuo Liu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86567?usp=email )
Change subject: util/cbfstool: Add missing \n in debug messages ......................................................................
util/cbfstool: Add missing \n in debug messages
Find all potential missings by below script and apply manual check and fixes.
grep -nE "(DEBUG|ERROR)(".+[^\n]"" util/cbfstool/ -r
Change-Id: I3e2c225dc16a65470f9f94db89d8ec3711e781c8 Signed-off-by: Shuo Liu shuo.liu@intel.com --- M util/cbfstool/cbfs_image.c M util/cbfstool/fit.c 2 files changed, 11 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/86567/1
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index e935357..3d768b0 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -636,7 +636,7 @@ if (header_offset % align) header_offset -= header_offset % align; if (header_offset < addr) { - ERROR("No space to hold cbfs_file header."); + ERROR("No space to hold cbfs_file header.\n"); return -1; }
@@ -783,10 +783,10 @@ // Test for complicated cases if (content_offset > 0) { if (addr_next < content_offset) { - DEBUG("Not for specified offset yet"); + DEBUG("Not for specified offset yet.\n"); continue; } else if (addr > content_offset) { - DEBUG("Exceed specified content_offset."); + DEBUG("Exceed specified content_offset.\n"); break; } else if (addr + header_size > content_offset) { ERROR("Not enough space for header.\n"); @@ -1879,7 +1879,7 @@ } while (next != NULL); uint32_t header_size = be32toh(header->offset) + size; if (header_size > CBFS_METADATA_MAX_SIZE) { - DEBUG("exceeding allocated space for cbfs_file headers"); + DEBUG("exceeding allocated space for cbfs_file headers.\n"); return NULL; } /* attr points to the last valid attribute now. @@ -2024,14 +2024,14 @@ offset = absolute_align(image, addr + metadata_size, align); if (is_in_same_page(offset, size, page_size) && is_in_range(addr, addr_next, metadata_size, offset, size)) { - DEBUG("cbfs_locate_entry: FIT (PAGE1)."); + DEBUG("cbfs_locate_entry: FIT (PAGE1).\n"); return offset; }
addr2 = align_up(addr, page_size); offset = absolute_align(image, addr2, align); if (is_in_range(addr, addr_next, metadata_size, offset, size)) { - DEBUG("cbfs_locate_entry: OVERLAP (PAGE2)."); + DEBUG("cbfs_locate_entry: OVERLAP (PAGE2).\n"); return offset; }
@@ -2041,7 +2041,7 @@ addr3 = addr2 + page_size; offset = absolute_align(image, addr3, align); if (is_in_range(addr, addr_next, metadata_size, offset, size)) { - DEBUG("cbfs_locate_entry: OVERLAP+ (PAGE3)."); + DEBUG("cbfs_locate_entry: OVERLAP+ (PAGE3).\n"); return offset; } } diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c index d4e48f1..ca60720 100644 --- a/util/cbfstool/fit.c +++ b/util/cbfstool/fit.c @@ -719,12 +719,12 @@ struct fit_entry *entry;
if (!fit) { - ERROR("Internal error."); + ERROR("Internal error.\n"); return 1; }
if (fit_free_space(fit, max_fit_entries) < 1) { - ERROR("No space left in FIT."); + ERROR("No space left in FIT.\n"); return 1; }
@@ -781,12 +781,12 @@ const size_t idx) { if (!fit) { - ERROR("Internal error."); + ERROR("Internal error.\n"); return 1; }
if (idx >= fit_table_entries(fit)) { - ERROR("Index out of range."); + ERROR("Index out of range.\n"); return 1; }