From 2887e2e10389915d7df2693418fed630ab883db7 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Wed, 26 Sep 2018 13:34:33 +0800 Subject: futility: update: Revise error messages Error messages should be printed using ERROR when being outside the main updater function (do_update). BRANCH=None BUG=None TEST=make futil; sudo tests/futility/run_test_scripts.sh $(pwd)/build/futility Change-Id: I037c99b6e4fbb6a05fd95d64a87d187d8531da39 Signed-off-by: Hung-Te Lin Reviewed-on: https://chromium-review.googlesource.com/1245641 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Randall Spangler --- futility/cmd_update.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/futility/cmd_update.c b/futility/cmd_update.c index ed9ee835..632296c2 100644 --- a/futility/cmd_update.c +++ b/futility/cmd_update.c @@ -1277,7 +1277,7 @@ static int verify_keyblock(const struct vb2_keyblock *block, free(new_block); if (r != VB2_SUCCESS) { - ERROR("Error verifying key block."); + ERROR("Failed verifying key block."); return -1; } return 0; @@ -1628,7 +1628,7 @@ static enum updater_error_codes update_try_rw_firmware( printf("Checking %s contents...\n", target); if (!firmware_section_exists(image_to, target)) { - Error("Cannot find section '%s' on firmware image: %s\n", + ERROR("Cannot find section '%s' on firmware image: %s", target, image_to->file_name); return UPDATE_ERR_INVALID_IMAGE; } -- cgit v1.2.1