From ff82ffb0a9cd28bc186eef2e86cfc61aec2d6029 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Mon, 30 Oct 2017 15:43:17 -0700 Subject: [PATCH] vboot: use VBNV_ constants with VbNvGet() The vboot1 library VbNvGet() / VbNvSet() functions use enum VbNvParam (VBNV_*) constants. The vboot2 library vb2_nv_get() / vb2_nv_set() functions use enum vb2_nv_param constants. Do not mix the two. In the one instance where this happens in the current code, we get lucky, because VBNV_DEV_BOOT_FASTBOOT_FULL_CAP and VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP evaluate to the same value, so this was harmless. But fix that now so nobody else copy/pastes that pattern for a param where this isn't true. BUG=none BRANCH=none TEST=make runtests Change-Id: I1facbe1d97591dc8b1e6b38717924b884949da57 Signed-off-by: Randall Spangler Reviewed-on: https://chromium-review.googlesource.com/764970 Reviewed-by: Julius Werner --- firmware/lib/vboot_api_kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 5c54c1225b..2cc1a88bb6 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -511,7 +511,7 @@ VbError_t VbVerifyMemoryBootImage(VbCommonParams *cparams, dev_switch = shared->flags & VBSD_BOOT_DEV_SWITCH_ON; VbNvLoad(); - VbNvGet(&vnc, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP, + VbNvGet(&vnc, VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, &allow_fastboot_full_cap); if (0 == allow_fastboot_full_cap) {