summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2023-05-17 11:40:33 +1000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-18 02:49:26 +0000
commit24f91b426b44df5fba362dadbaff9987d7c73154 (patch)
treeef5eb1e946bcbf19a89eeff243a00f4587116cfd
parent56eff1e773f02c25c0b0f08ff307fef5c0f7c511 (diff)
downloadvboot-main.tar.gz
futility/: Drop dup host programmer defineHEADmain
BUG=b:282585789 BRANCH=none TEST=`cros_run_unit_tests --host --packages vboot_reference`. Change-Id: I263ea5a68da3be4fdb07bfd0197645180d32ed3f Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4542040 Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
-rw-r--r--futility/cmd_update.c2
-rw-r--r--futility/updater.c8
-rw-r--r--futility/updater_utils.h3
3 files changed, 6 insertions, 7 deletions
diff --git a/futility/cmd_update.c b/futility/cmd_update.c
index 3b429ec0..d9dc62cd 100644
--- a/futility/cmd_update.c
+++ b/futility/cmd_update.c
@@ -145,7 +145,7 @@ static void print_help(int argc, char *argv[])
"-d, --debug \tPrint debugging messages\n"
"-v, --verbose \tPrint verbose messages\n"
"",
- argv[0], PROG_HOST);
+ argv[0], FLASHROM_PROGRAMMER_INTERNAL_AP);
}
static int do_update(int argc, char *argv[])
diff --git a/futility/updater.c b/futility/updater.c
index 0877b302..69b24b85 100644
--- a/futility/updater.c
+++ b/futility/updater.c
@@ -381,7 +381,7 @@ static int preserve_management_engine(struct updater_config *cfg,
image_from, image_to, FMAP_SI_DESC);
}
- if (!strcmp(cfg->original_programmer, PROG_HOST)) {
+ if (!strcmp(cfg->original_programmer, FLASHROM_PROGRAMMER_INTERNAL_AP)) {
if (try_apply_quirk(QUIRK_PRESERVE_ME, cfg) > 0) {
VB2_DEBUG("ME needs to be preserved - preserving %s.\n",
FMAP_SI_ME);
@@ -1197,9 +1197,9 @@ struct updater_config *updater_new_config(void)
1, sizeof(struct updater_config));
if (!cfg)
return cfg;
- cfg->image.programmer = PROG_HOST;
- cfg->image_current.programmer = PROG_HOST;
- cfg->original_programmer = PROG_HOST;
+ cfg->image.programmer = FLASHROM_PROGRAMMER_INTERNAL_AP;
+ cfg->image_current.programmer = FLASHROM_PROGRAMMER_INTERNAL_AP;
+ cfg->original_programmer = FLASHROM_PROGRAMMER_INTERNAL_AP;
cfg->ec_image.programmer = PROG_EC;
cfg->check_platform = 1;
diff --git a/futility/updater_utils.h b/futility/updater_utils.h
index a6be5d0e..01837ba5 100644
--- a/futility/updater_utils.h
+++ b/futility/updater_utils.h
@@ -19,8 +19,7 @@
struct u_archive;
/* flashrom programmers. */
-static const char * const PROG_HOST = "host",
- * const PROG_EC = "ec";
+static const char * const PROG_EC = "ec";
/* Firmware slots */
static const char * const FWACT_A = "A",