diff options
author | Tao Bao | 2015-05-19 19:02:16 -0500 |
---|---|---|
committer | Tao Bao | 2015-06-03 00:15:40 -0500 |
commit | b6918c7c433054ac4352d5f7746f7c2bf2971083 (patch) | |
tree | 4236756d31f2f9dc4cb4736d08bc2a41f4404fe5 /ui.h | |
parent | a8cd96adeeb530eda74e435e626900a3a76844a7 (diff) | |
download | platform-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 'ui.h')
-rw-r--r-- | ui.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -62,8 +62,10 @@ class RecoveryUI { | |||
62 | virtual bool WasTextEverVisible() = 0; | 62 | virtual bool WasTextEverVisible() = 0; |
63 | 63 | ||
64 | // Write a message to the on-screen log (shown if the user has | 64 | // Write a message to the on-screen log (shown if the user has |
65 | // toggled on the text display). | 65 | // toggled on the text display). Print() will also dump the message |
66 | // to stdout / log file, while PrintOnScreenOnly() not. | ||
66 | virtual void Print(const char* fmt, ...) __printflike(2, 3) = 0; | 67 | virtual void Print(const char* fmt, ...) __printflike(2, 3) = 0; |
68 | virtual void PrintOnScreenOnly(const char* fmt, ...) __printflike(2, 3) = 0; | ||
67 | 69 | ||
68 | virtual void ShowFile(const char* filename) = 0; | 70 | virtual void ShowFile(const char* filename) = 0; |
69 | 71 | ||