summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2023-02-09 21:10:14 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-12 10:37:41 +0000
commit04a92c59a3c62100846b74e64def618b4d1ed20e (patch)
treeeeef0383ea363e1d72148c77b80e7e8335e47b59
parent9813a9b4470bd1609c853a2381f050faebd4902e (diff)
downloadvboot-04a92c59a3c62100846b74e64def618b4d1ed20e.tar.gz
futility: updater: support getting WPSW from any DUTs
From b:255617349#comment133, the --wp-* commands should work with any servo, including servo-micro; so we should pass the right DUT programmer (e.g., cfg->image.programmer) instead of PROG_HOST when retrieving software write protection status (WPSW). BUG=b:255617349 TEST=make; run test BRANCH=None Change-Id: Iff5a105da8bed06bbd714a72a7d06d2b64b3dcd4 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4235303 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
-rw-r--r--futility/updater_dut.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/futility/updater_dut.c b/futility/updater_dut.c
index 689dd227..8789f89b 100644
--- a/futility/updater_dut.c
+++ b/futility/updater_dut.c
@@ -99,7 +99,8 @@ static int dut_get_platform_version(struct updater_config *cfg)
/* Helper function to return host software write protection status. */
static int dut_get_wp_sw(struct updater_config *cfg)
{
- return flashrom_get_wp(PROG_HOST, -1);
+ assert(cfg->image.programmer);
+ return flashrom_get_wp(cfg->image.programmer, -1);
}
/* Helper functions to use or configure the DUT properties. */