summaryrefslogtreecommitdiff
path: root/futility/updater_quirks.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-11-21 10:35:42 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-11-24 19:21:29 -0800
commit356d5f1c866655af435400da91ecb6010f96ceb9 (patch)
tree613f35138f4ef26c5fd8e243cbee9e808be3a457 /futility/updater_quirks.c
parentef9c01981abe91691bdc34f7efbad6bb58360f70 (diff)
downloadvboot-356d5f1c866655af435400da91ecb6010f96ceb9.tar.gz
futility: updater: Revise output messages for debug logs
In auto update and recovery, the firmware updater was executed with both stdout and stderr logged. However, the logs usually comes with all stderr first then all stdout. This makes it harder to debug because the messages logged in out of order. TO solve that, few macros are introduced: INFO: for useful information. STATUS: the most common information, usually comes with a prefix code. And all messages should now go to stderr except the final execution result (and those output commands, for example --manifest). BUG=chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility CQ-DEPEND=CL:1345250 BRANCH=None Change-Id: Ie0dc6594ece10e7e15caf9c36353e2b3ec8754c5 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1345611 Reviewed-by: Youcheng Syu <youcheng@chromium.org>
Diffstat (limited to 'futility/updater_quirks.c')
-rw-r--r--futility/updater_quirks.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/futility/updater_quirks.c b/futility/updater_quirks.c
index 76b040c8..b3fbe63c 100644
--- a/futility/updater_quirks.c
+++ b/futility/updater_quirks.c
@@ -134,7 +134,7 @@ static int quirk_unlock_me_for_update(struct updater_config *cfg)
* b/35568719: We should only update with unlocked ME and let
* board-postinst lock it.
*/
- printf("%s: Changed Flash Master Values to unlocked.\n", __FUNCTION__);
+ INFO("%s: Changed Flash Master Values to unlocked.", __FUNCTION__);
memcpy(section.data + flash_master_offset, flash_master,
ARRAY_SIZE(flash_master));
return 0;
@@ -192,8 +192,8 @@ static int quirk_daisy_snow_dual_model(struct updater_config *cfg)
if (strcmp(x16_versions[i], platform_version) == 0)
is_x16 = 1;
}
- printf("%s: Platform version: %s (original value: %s)\n", __FUNCTION__,
- is_x8 ? "x8" : is_x16 ? "x16": "unknown", platform_version);
+ INFO("%s: Platform version: %s (original value: %s)", __FUNCTION__,
+ is_x8 ? "x8" : is_x16 ? "x16": "unknown", platform_version);
free(platform_version);
find_firmware_section(&a, &cfg->image, FMAP_RW_SECTION_A);