cbfs: Fix attribute tag printing in cbfs_find_attr()

Attribute tags are defined as hexadecimal constants, not decimal, so it
makes more sense to print them like that in error messages as well.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I3a5a6a8c9b8d24e57633595fc47221a483d8593a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48836
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Julius Werner 2020-12-21 17:17:02 -08:00
parent 5779ca718c
commit 10ee7fc03a
1 changed files with 2 additions and 2 deletions

View File

@ -173,13 +173,13 @@ const void *cbfs_find_attr(const union cbfs_mdata *mdata, uint32_t attr_tag, siz
const uint32_t len = be32toh(attr->len); const uint32_t len = be32toh(attr->len);
if (offset + len > end) { if (offset + len > end) {
ERROR("Attribute %s[%u] overflows end of metadata\n", ERROR("Attribute %s[%x] overflows end of metadata\n",
mdata->h.filename, tag); mdata->h.filename, tag);
return NULL; return NULL;
} }
if (tag == attr_tag) { if (tag == attr_tag) {
if (size_check && len != size_check) { if (size_check && len != size_check) {
ERROR("Attribute %s[%u] size mismatch: %u != %zu\n", ERROR("Attribute %s[%x] size mismatch: %u != %zu\n",
mdata->h.filename, tag, len, size_check); mdata->h.filename, tag, len, size_check);
return NULL; return NULL;
} }