aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2015-05-19 19:02:16 -0500
committerTao Bao2015-06-03 00:15:40 -0500
commitb6918c7c433054ac4352d5f7746f7c2bf2971083 (patch)
tree4236756d31f2f9dc4cb4736d08bc2a41f4404fe5 /screen_ui.h
parenta8cd96adeeb530eda74e435e626900a3a76844a7 (diff)
downloadplatform-bootable-recovery-b6918c7c433054ac4352d5f7746f7c2bf2971083.tar.gz
platform-bootable-recovery-b6918c7c433054ac4352d5f7746f7c2bf2971083.tar.xz
platform-bootable-recovery-b6918c7c433054ac4352d5f7746f7c2bf2971083.zip
Log update outputs in order
Although stdout and stderr are both redirected to log file with no buffering, we are seeing some outputs are mixed in random order. This is because ui_print commands from the updater are passed to the recovery binary via a pipe, which may interleave with other outputs that go to stderr directly. In recovery, adding ui::PrintOnScreenOnly() function to handle ui_print command, which skips printing to stdout. Meanwhile, updater prints the contents to stderr in addition to piping them to recovery. Change-Id: Idda93ea940d2e23a0276bb8ead4aa70a3cb97700
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/screen_ui.h b/screen_ui.h
index ea05bf15..8e18864d 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -49,6 +49,7 @@ class ScreenRecoveryUI : public RecoveryUI {
49 49
50 // printing messages 50 // printing messages
51 void Print(const char* fmt, ...) __printflike(2, 3); 51 void Print(const char* fmt, ...) __printflike(2, 3);
52 void PrintOnScreenOnly(const char* fmt, ...) __printflike(2, 3);
52 void ShowFile(const char* filename); 53 void ShowFile(const char* filename);
53 54
54 // menu display 55 // menu display
@@ -125,6 +126,7 @@ class ScreenRecoveryUI : public RecoveryUI {
125 void ProgressThreadLoop(); 126 void ProgressThreadLoop();
126 127
127 void ShowFile(FILE*); 128 void ShowFile(FILE*);
129 void PrintV(const char*, bool, va_list);
128 void PutChar(char); 130 void PutChar(char);
129 void ClearText(); 131 void ClearText();
130 132