vb2_context: Use fixed-width type for boot_mode

Using enum types in serialized data structures is dangerous, because
their width may depend on compiler settings. This patch changes the data
type for (vb2_context).boot_mode to uint8_t to make sure the struct
layout will be the same in all environments. Since we only defined boot
modes up to 5 for now (and our systems are always little endian), the
structure remains binary compatible with serializations of the previous
version (so no struct version change should be necessary).

BRANCH=none
BUG=none
TEST=make runtests

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I82bc8e665ea51adaaf1f5d94986c22bd62e58bba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3751833
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@chromium.org>
1 file changed