[coreboot-gerrit] New patch to review for coreboot: vboot/vbnv_flash: fix return value check for rdev_writeat()
Aaron Durbin (adurbin@chromium.org)
gerrit at coreboot.org
Tue Aug 23 20:26:10 CEST 2016
Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16303
-gerrit
commit 726e8874bbb7ccd5624dff00a7064d89c6f73dd9
Author: Aaron Durbin <adurbin at chromium.org>
Date: Tue Aug 23 13:22:17 2016 -0500
vboot/vbnv_flash: fix return value check for rdev_writeat()
The return value check was incorect and checking for failure
in the success path. Fix the return value check so that it
actually checks for success.
BUG=chrome-os-partner:56151
Change-Id: Ie7960b89a916dec261015c97c3e0552be56b5b5d
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/vboot/vbnv_flash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vboot/vbnv_flash.c b/src/vboot/vbnv_flash.c
index d061228..81c4f08 100644
--- a/src/vboot/vbnv_flash.c
+++ b/src/vboot/vbnv_flash.c
@@ -165,7 +165,7 @@ void save_vbnv_flash(const uint8_t *vbnv_copy)
}
}
- if (rdev_writeat(rdev, vbnv_copy, new_offset, BLOB_SIZE) < 0) {
+ if (rdev_writeat(rdev, vbnv_copy, new_offset, BLOB_SIZE) == BLOB_SIZE) {
/* write was successful. safely move pointer forward */
ctx->blob_offset = new_offset;
memcpy(ctx->cache, vbnv_copy, BLOB_SIZE);
More information about the coreboot-gerrit
mailing list