summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2023-05-15 13:42:21 +1000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-16 04:24:01 +0000
commit37634642631daeb219b8c798239e19da42614c8a (patch)
treea5fdedb7e29cd86aa2bdf01518bef9808f08f3c0
parenteefdf8656314f539e98b3c7a1f16810d73e5ef3a (diff)
downloadvboot-37634642631daeb219b8c798239e19da42614c8a.tar.gz
futility/updater.c: Rename write_optional_firmware()
The function relates to the EC path. BUG=b:282585789 BRANCH=none TEST=`cros_run_unit_tests --host --packages vboot_reference`. Change-Id: I0da0df25f659404bd639a863a68a2b717d593d1d Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532318 Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
-rw-r--r--futility/updater.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/futility/updater.c b/futility/updater.c
index 5272b2e5..da46704b 100644
--- a/futility/updater.c
+++ b/futility/updater.c
@@ -331,17 +331,16 @@ static int has_valid_update(struct updater_config *cfg,
}
/*
- * Write a section from given firmware image to system firmware if possible.
+ * Write a section from given firmware image to system EC firmware if possible.
* If section_name is NULL, write whole image. If the image has no data or if
* the section does not exist, ignore and return success.
* Returns 0 if success, non-zero if error.
*/
-static int write_optional_firmware(struct updater_config *cfg,
+static int write_ec_firmware(struct updater_config *cfg,
const struct firmware_image *image,
const char *section_name)
{
- /*
- * EC & PD may have different WP settings and we want to write
+ /** EC may have different WP settings and we want to write
* only if it is OK.
*/
if (is_write_protection_enabled(cfg)) {
@@ -851,10 +850,10 @@ static int update_ec_firmware(struct updater_config *cfg)
int r = try_apply_quirk(QUIRK_EC_PARTIAL_RECOVERY, cfg);
switch (r) {
case EC_RECOVERY_FULL:
- return write_optional_firmware(cfg, ec_image, NULL);
+ return write_ec_firmware(cfg, ec_image, NULL);
case EC_RECOVERY_RO:
- return write_optional_firmware(cfg, ec_image, "WP_RO");
+ return write_ec_firmware(cfg, ec_image, "WP_RO");
case EC_RECOVERY_DONE:
/* Done by some quirks, for example EC RO software sync. */