mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
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>
This commit is contained in:
+4
-10
@@ -202,7 +202,6 @@ enum {
|
|||||||
CMD_SWAP,
|
CMD_SWAP,
|
||||||
CMD_COPY,
|
CMD_COPY,
|
||||||
CMD_BRICK,
|
CMD_BRICK,
|
||||||
CMD_SETCHECKSUM
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -249,6 +248,10 @@ struct commands {
|
|||||||
* Command table, for nvmutil commands
|
* Command table, for nvmutil commands
|
||||||
*/
|
*/
|
||||||
static const struct commands command[] = {
|
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,
|
{ CMD_DUMP, "dump", cmd_dump, ARGC_3,
|
||||||
NO_INVERT, SET_MOD_OFF,
|
NO_INVERT, SET_MOD_OFF,
|
||||||
ARG_NOPART,
|
ARG_NOPART,
|
||||||
@@ -288,15 +291,6 @@ static const struct commands command[] = {
|
|||||||
ARG_PART,
|
ARG_PART,
|
||||||
CHECKSUM_READ, SKIP_CHECKSUM_WRITE,
|
CHECKSUM_READ, SKIP_CHECKSUM_WRITE,
|
||||||
NVM_SIZE },
|
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
|
#define MAX_CMD_LEN 50
|
||||||
|
|||||||
Reference in New Issue
Block a user