aboutsummaryrefslogtreecommitdiffstats
path: root/screen_ui.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-05-19 17:02:16 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-07 19:02:26 -0800
commit60ae120f7d94c6b3c526c9dd7e7e638ad5d9b6f6 (patch)
tree0fcee8cce3db987a0baaf2c6c091a7714d0fc53e /screen_ui.h
parent45c6451216ea62837006977ca38612c84c57e839 (diff)
downloadbootable_recovery-60ae120f7d94c6b3c526c9dd7e7e638ad5d9b6f6.zip
bootable_recovery-60ae120f7d94c6b3c526c9dd7e7e638ad5d9b6f6.tar.gz
bootable_recovery-60ae120f7d94c6b3c526c9dd7e7e638ad5d9b6f6.tar.bz2
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 ea05bf1..8e18864 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -49,6 +49,7 @@ class ScreenRecoveryUI : public RecoveryUI {
// printing messages
void Print(const char* fmt, ...) __printflike(2, 3);
+ void PrintOnScreenOnly(const char* fmt, ...) __printflike(2, 3);
void ShowFile(const char* filename);
// menu display
@@ -125,6 +126,7 @@ class ScreenRecoveryUI : public RecoveryUI {
void ProgressThreadLoop();
void ShowFile(FILE*);
+ void PrintV(const char*, bool, va_list);
void PutChar(char);
void ClearText();