Merge "Print with newline for ui_print."

This commit is contained in:
Tao Bao
2017-01-24 04:54:51 +00:00
committed by Gerrit Code Review
3 changed files with 1 additions and 7 deletions

View File

@@ -420,11 +420,7 @@ static int try_update_binary(const char* path, ZipArchiveHandle zip, bool* wipe_
LOG(ERROR) << "invalid \"set_progress\" parameters: " << line;
}
} else if (command == "ui_print") {
if (!args.empty()) {
ui->PrintOnScreenOnly("%s", args.c_str());
} else {
ui->PrintOnScreenOnly("\n");
}
ui->PrintOnScreenOnly("%s\n", args.c_str());
fflush(stdout);
} else if (command == "wipe_cache") {
*wipe_cache = true;

View File

@@ -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");
}
}

View File

@@ -191,7 +191,6 @@ int main(int argc, char** argv) {
}
fprintf(cmd_pipe, "ui_print %s\n", line.c_str());
}
fprintf(cmd_pipe, "ui_print\n");
}
if (state.error_code != kNoError) {