Hello Furquan Shaikh, Patrick Georgi,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/48278
to review the following change.
Change subject: cbfs: Add more error messages for lookup ......................................................................
cbfs: Add more error messages for lookup
The new CBFS stack will log messages for found files but leaves error messages up to the caller. This patch adds appropriate generic error messages to cbfs_lookup(), matching the behavior of the old CBFS stack for not found files.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I8cf44026accc03c466105d06683027caf1693ff0 --- M src/lib/cbfs.c 1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/48278/1
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 5df1d8b..d66c5d6 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -52,8 +52,17 @@ name); return cbfs_boot_lookup(name, true, mdata, rdev); } - if (err) + if (err) { + if (err == CB_CBFS_NOT_FOUND) + printk(BIOS_WARNING, "CBFS: '%s' not found.\n", name); + else if (err == CB_CBFS_HASH_MISMATCH) + die("CBFS FATAL ERROR: metadata hash mismatch!\n"); + else + printk(BIOS_ERR, + "CBFS ERROR: error %d when looking up '%s'\n", + err, name); return err; + }
if (rdev_chain(rdev, &cbd->rdev, data_offset, be32toh(mdata->h.len))) return CB_ERR;
Hello Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48278
to look at the new patch set (#2).
Change subject: cbfs: Add more error messages for lookup ......................................................................
cbfs: Add more error messages for lookup
The new CBFS stack will log messages for found files but leaves error messages up to the caller. This patch adds appropriate generic error messages to cbfs_lookup(), matching the behavior of the old CBFS stack for not found files.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I8cf44026accc03c466105d06683027caf1693ff0 --- M src/lib/cbfs.c 1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/48278/2
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48278
to look at the new patch set (#3).
Change subject: cbfs: Add more error messages for lookup ......................................................................
cbfs: Add more error messages for lookup
The new CBFS stack will log messages for found files but leaves error messages up to the caller. This patch adds appropriate generic error messages to cbfs_lookup(), matching the behavior of the old CBFS stack for not found files.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I8cf44026accc03c466105d06683027caf1693ff0 --- M src/lib/cbfs.c 1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/48278/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48278 )
Change subject: cbfs: Add more error messages for lookup ......................................................................
Patch Set 3: Code-Review+2
Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48278 )
Change subject: cbfs: Add more error messages for lookup ......................................................................
cbfs: Add more error messages for lookup
The new CBFS stack will log messages for found files but leaves error messages up to the caller. This patch adds appropriate generic error messages to cbfs_lookup(), matching the behavior of the old CBFS stack for not found files.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I8cf44026accc03c466105d06683027caf1693ff0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48278 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/lib/cbfs.c 1 file changed, 10 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 5df1d8b..d275505 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -52,8 +52,17 @@ name); return cbfs_boot_lookup(name, true, mdata, rdev); } - if (err) + if (err) { + if (err == CB_CBFS_NOT_FOUND) + printk(BIOS_WARNING, "CBFS: '%s' not found.\n", name); + else if (err == CB_CBFS_HASH_MISMATCH) + printk(BIOS_ERR, "CBFS ERROR: metadata hash mismatch!\n"); + else + printk(BIOS_ERR, + "CBFS ERROR: error %d when looking up '%s'\n", + err, name); return err; + }
if (rdev_chain(rdev, &cbd->rdev, data_offset, be32toh(mdata->h.len))) return CB_ERR;