summaryrefslogtreecommitdiff
path: root/util/nvmutil/lib/checksum.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-18 19:30:32 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commitaff629f57169efd53a62496ff5e71d6f61eedbb1 (patch)
treef3cac20ca0f2c934dd9841e5c04460f64ea469dc /util/nvmutil/lib/checksum.c
parent3010781df6cd9e1a4b0ed3fb369c225774f49f47 (diff)
util/nvmutil: major cleanup
handle init in xstatus() it's now a singleton design also tidied up some other code also removed todo.c. bloat. will do all those anyway. too much change. i just kept touching the code until it looked good Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/lib/checksum.c')
-rw-r--r--util/nvmutil/lib/checksum.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/util/nvmutil/lib/checksum.c b/util/nvmutil/lib/checksum.c
index 35b88eb9..d006a106 100644
--- a/util/nvmutil/lib/checksum.c
+++ b/util/nvmutil/lib/checksum.c
@@ -29,9 +29,9 @@
void
read_checksums(void)
{
- struct xstate *x = xstatus();
- struct commands *cmd;
- struct xfile *f;
+ struct xstate *x = xstatus(0, NULL);
+ struct commands *cmd = &x->cmd[x->i];
+ struct xfile *f = &x->f;
unsigned long _p;
unsigned long _skip_part;
@@ -39,9 +39,6 @@ read_checksums(void)
unsigned char _num_invalid;
unsigned char _max_invalid;
- cmd = &x->cmd[x->i];
- f = &x->f;
-
f->part_valid[0] = 0;
f->part_valid[1] = 0;