diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-09 02:19:24 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-09 02:19:24 +0000 |
| commit | 0c64907a9eee975f60fd6b77a0c43365a089c846 (patch) | |
| tree | 7f292ef70034450f21290cdcc42c4f0863ba5732 /util/nvmutil/nvmutil.c | |
| parent | f7dfb0d265ce3d1bb538997b81d0bae0a6fedb74 (diff) | |
util/nvmutil: remove the setchecksum command
This feature is extremely dangerous, and we should
discourage against its use.
This is part of a series of changes that I've made
to make the code safer. You should only ever run
this on a valid GbE file, and nothing else.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index d2bc0aa5..13a4d9db 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -202,7 +202,6 @@ enum { CMD_SWAP, CMD_COPY, CMD_BRICK, - CMD_SETCHECKSUM }; /* @@ -249,6 +248,10 @@ struct commands { * Command table, for nvmutil commands */ static const struct commands command[] = { + /* + * Unlike older versions, we now require + * both checksums to be valid for "dump". + */ { CMD_DUMP, "dump", cmd_dump, ARGC_3, NO_INVERT, SET_MOD_OFF, ARG_NOPART, @@ -288,15 +291,6 @@ static const struct commands command[] = { ARG_PART, CHECKSUM_READ, SKIP_CHECKSUM_WRITE, NVM_SIZE }, - - /* - * The non-target part will not be read. - */ - { CMD_SETCHECKSUM, "setchecksum", NULL, ARGC_4, - NO_INVERT, SET_MOD_N, - ARG_PART, - SKIP_CHECKSUM_READ, CHECKSUM_WRITE, - NVM_SIZE }, }; #define MAX_CMD_LEN 50 |
