Fix the SPD bug of 'vpd -O' in R11 factory branch.
In R11, the vpd -O would clean the SPD data in VPD partition. The CL edca624
in ToT has fixed this, but it is a big change. So I extracted few code in
that CL and apply to branch remotes/cros/0.11.241.B.
The original code overwrites the SPD if no FMAP structure is found. This CL
reads in the 'FMAP' partition so that vpd.c can parse the FMAP structure and
set found_vpd=1. So that saveFile() can preserve the SPD in file, rather than
create a new file.
TEST=tested on a*x machine.
Reviewed-by: David Hendricks <email@example.com>
Tested-by: Yung-Chieh Lo <firstname.lastname@example.org>
2 files changed