recovery: Remove redirect_stdio() when calling ShowFile().

When calling ScreenRecoveryUI::ShowFile(), the only thing that gets
inadequately logged is the progress bar. Replace the call to
ScreenRecoveryUI::Print() with ScreenRecoveryUI::PrintOnScreenOnly() for
the progress bar, so we can avoid calling redirect_stdio().

Change-Id: I4d7c5d5b39bebe0d5880a99d7a72cee4f0b8f325
This commit is contained in:
Tao Bao
2015-09-10 13:42:05 -07:00
parent 7a6778078b
commit 9a7fd80d2d
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -581,7 +581,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) {
bool show_prompt = false;
while (true) {
if (show_prompt) {
Print("--(%d%% of %d bytes)--",
PrintOnScreenOnly("--(%d%% of %d bytes)--",
static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))),
static_cast<int>(sb.st_size));
Redraw();