From 9c44b256458e8d203200f06dbf4a471afaabdf0c Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sat, 20 Feb 2016 18:49:13 +0100 Subject: nvramtool: Print computed and stored checksum in case of mismatch. This is to make it easier to fix checksum issues. Example: # nvramtool -a [...] nvramtool: Warning: Coreboot CMOS checksum is bad. Computed checksum: 0xfa. Stored checksum: 0x0 # nvramtool -c 0xfa Change-Id: Ifacb68b5693afbdfcb521acd6937e270ead85186 Signed-off-by: Denis 'GNUtoo' Carikli Reviewed-on: https://review.coreboot.org/13770 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel --- util/nvramtool/cmos_ops.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/nvramtool') diff --git a/util/nvramtool/cmos_ops.c b/util/nvramtool/cmos_ops.c index 8873633cb5..6f616a0335 100644 --- a/util/nvramtool/cmos_ops.c +++ b/util/nvramtool/cmos_ops.c @@ -229,6 +229,8 @@ void cmos_checksum_verify(void) if (computed != actual) { fprintf(stderr, "%s: Warning: Coreboot CMOS checksum is bad.\n", prog_name); + fprintf(stderr, "Computed checksum: 0x%x. Stored checksum: 0x%x\n", + computed, actual); exit(1); } } -- cgit v1.2.3