summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-08 23:39:13 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-08 23:39:13 +0000
commit07f9f607ab3d3bb51430b6176633fd58d5723bee (patch)
tree15d85daf2a844a8310b314c6b9884da5e6d690b0
parentdbd4d6d84a30552aac8fce7683504e91b6e43e18 (diff)
util/nvmutil: don't re-calculate skip_part
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 71f6cbfc..173dd7fa 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -668,11 +668,16 @@ read_checksums(void)
if (arg_part)
max_invalid = 1;
+ /*
+ * Skip verification on this part,
+ * but only when arg_part is set.
+ */
+ skip_part = part ^ 1 ^ invert;
+
for (p = 0; p < 2; p++) {
/*
* Only verify a part if it was *read*
*/
- skip_part = part ^ 1 ^ invert;
if (arg_part && (p == skip_part))
continue;