From f013642477dbe0a5ed8d440571e9c8676ed42b2d Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 21 Jan 2017 13:03:25 -0800 Subject: Print with newline for ui_print. Currently the ui_print command between the recovery and updater doesn't append newline. Updater has to send an extra "ui_print" command without any argument to get the line break. This looks unnecessary. And not all the callers (including the ones in bootable/recovery) are following this protocol when sending the ui_print command. This CL simplifies the protocol to always print with a newline for ui_print command. When updating from an old recovery with the new updater, all the ui_print'd strings would appear in one line as a side effect. But a) it would only affect the text-mode UI, which won't be shown to users; b) log files won't be affected. Bug: 32305035 Test: Apply an update with the new updater on top of an old and new recovery image respectively. Change-Id: I305a0ffc6f180daf60919cf99d24d1495d68749b --- updater/install.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'updater/install.cpp') diff --git a/updater/install.cpp b/updater/install.cpp index 643145447..7a8e92f6c 100644 --- a/updater/install.cpp +++ b/updater/install.cpp @@ -76,7 +76,6 @@ static void uiPrint(State* state, const std::string& buffer) { for (auto& line : lines) { if (!line.empty()) { fprintf(ui->cmd_pipe, "ui_print %s\n", line.c_str()); - fprintf(ui->cmd_pipe, "ui_print\n"); } } -- cgit v1.2.3