summaryrefslogtreecommitdiff
path: root/src/drivers/vpd/vpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/vpd/vpd.c')
-rw-r--r--src/drivers/vpd/vpd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/vpd/vpd.c b/src/drivers/vpd/vpd.c
index f5ac81ebfd..c332a6e94c 100644
--- a/src/drivers/vpd/vpd.c
+++ b/src/drivers/vpd/vpd.c
@@ -209,10 +209,14 @@ const void *vpd_find(const char *key, int *size, enum vpd_region region)
init_vpd_rdevs();
- if (region != VPD_RW)
+ if (region == VPD_RW_THEN_RO)
+ vpd_find_in(&rw_vpd, &arg);
+
+ if (!arg.matched && (region == VPD_RO || region == VPD_RO_THEN_RW ||
+ region == VPD_RW_THEN_RO))
vpd_find_in(&ro_vpd, &arg);
- if (!arg.matched && region != VPD_RO)
+ if (!arg.matched && (region == VPD_RW || region == VPD_RO_THEN_RW))
vpd_find_in(&rw_vpd, &arg);
if (!arg.matched)