diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-09 21:41:14 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-09 21:49:07 +0000 |
| commit | 7d64b8ea8daec489dcf9dead62eab29758d42af4 (patch) | |
| tree | 0f5fb75b345a243f8dc189cf5e827528a8859907 /util | |
| parent | 45ea92a077bf7a822f0562b10652e98431fe3ce4 (diff) | |
util/nvmutil: allow dump without good checksums
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 37959bd2..620fe00e 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -289,7 +289,7 @@ static const struct commands command[] = { { CMD_DUMP, "dump", cmd_helper_dump, ARGC_3, NO_INVERT, SET_MOD_OFF, ARG_NOPART, - CHECKSUM_READ, SKIP_CHECKSUM_WRITE, + SKIP_CHECKSUM_READ, SKIP_CHECKSUM_WRITE, NVM_SIZE }, { CMD_SETMAC, "setmac", cmd_helper_setmac, ARGC_3, @@ -1037,8 +1037,12 @@ cmd_helper_dump(void) { size_t partnum; - for (partnum = 0; partnum < 2; partnum++) { + int errval = good_checksum(0); + errval |= good_checksum(1); + if (errval) + errno = 0; + for (partnum = 0; partnum < 2; partnum++) { printf("MAC (part %zu): ", partnum); print_mac_from_nvm(partnum); hexdump(partnum); |
