Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15968
-gerrit
commit 79ebcad9f5da6f03c65158c86b463bb2676e180a Author: Patrick Georgi pgeorgi@chromium.org Date: Fri Jul 29 21:01:19 2016 +0200
nvramtool: Don't consider reserved regions to be "out of range"
Reserved regions showed different behavior for debug and regular builds. Debug output was unfriendly, regular was wrong. Print a proper error message and exit instead.
Change-Id: I9842ff61f7d554800e2041e8c4c607f22b2df79f Signed-off-by: Patrick Georgi pgeorgi@chromium.org Found-by: Coverity Scan #1287076 --- util/nvramtool/cli/nvramtool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/nvramtool/cli/nvramtool.c b/util/nvramtool/cli/nvramtool.c index ac13acc..7f5fba8 100644 --- a/util/nvramtool/cli/nvramtool.c +++ b/util/nvramtool/cli/nvramtool.c @@ -761,7 +761,10 @@ static int list_cmos_entry(const cmos_entry_t * e, int show_name) break;
case CMOS_OP_RESERVED: - BUG(); + fprintf(stderr, + "%s: Cannot access reserved CMOS area (for %s).\n", + prog_name, e->name); + return 1;
case CMOS_AREA_OUT_OF_RANGE: fprintf(stderr,