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>
This commit is contained in:
parent
0e92bb010f
commit
9c44b25645
|
@ -229,6 +229,8 @@ void cmos_checksum_verify(void)
|
||||||
if (computed != actual) {
|
if (computed != actual) {
|
||||||
fprintf(stderr, "%s: Warning: Coreboot CMOS checksum is bad.\n",
|
fprintf(stderr, "%s: Warning: Coreboot CMOS checksum is bad.\n",
|
||||||
prog_name);
|
prog_name);
|
||||||
|
fprintf(stderr, "Computed checksum: 0x%x. Stored checksum: 0x%x\n",
|
||||||
|
computed, actual);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue