From 24f91b426b44df5fba362dadbaff9987d7c73154 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Wed, 17 May 2023 11:40:33 +1000 Subject: futility/: Drop dup host programmer define BUG=b:282585789 BRANCH=none TEST=`cros_run_unit_tests --host --packages vboot_reference`. Change-Id: I263ea5a68da3be4fdb07bfd0197645180d32ed3f Signed-off-by: Edward O'Callaghan Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4542040 Tested-by: Edward O'Callaghan Reviewed-by: Nikolai Artemiev Commit-Queue: Edward O'Callaghan Auto-Submit: Edward O'Callaghan --- futility/cmd_update.c | 2 +- futility/updater.c | 8 ++++---- futility/updater_utils.h | 3 +-- 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", -- cgit v1.2.1