diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> | 2016-02-20 18:49:13 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-02-26 07:02:01 +0100 |
commit | 9c44b256458e8d203200f06dbf4a471afaabdf0c (patch) | |
tree | 2f91d8b25fb85da612ae6410f9071d0d82efbeac /util/nvramtool | |
parent | 0e92bb010f8bd45b2543f2553a4d3c2f35dffc09 (diff) |
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 <GNUtoo@no-log.org>
Reviewed-on: https://review.coreboot.org/13770
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/nvramtool')
-rw-r--r-- | util/nvramtool/cmos_ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } } |