aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-05-14 11:03:02 -0700
committerDoug Zongker <dougz@android.com>2013-05-16 10:47:02 -0700
commit596b342a0476629badb41b840494254a19c57dae (patch)
tree3aab0c59d51a4a5bef461a476f635ee51bbf3495 /common.h
parentc7a6858dc9d4e75c9c889890902141c4243228a7 (diff)
downloadbootable_recovery-596b342a0476629badb41b840494254a19c57dae.zip
bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.gz
bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.bz2
recovery: turn on text display for install errors in debug builds
Hopefully this will reduce the number of OTA "bugs" reported that are really just someone having changed their system partition, invalidating future incremental OTAs. Also fixes a longstanding TODO about putting LOGE() output in the on-screen display. Change-Id: I44e5be65b2dee7ebce2cce28ccd920dc3d6e522e
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/common.h b/common.h
index 3587a31..768f499 100644
--- a/common.h
+++ b/common.h
@@ -18,13 +18,13 @@
#define RECOVERY_COMMON_H
#include <stdio.h>
+#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
-// TODO: restore ui_print for LOGE
-#define LOGE(...) fprintf(stdout, "E:" __VA_ARGS__)
+#define LOGE(...) ui_print("E:" __VA_ARGS__)
#define LOGW(...) fprintf(stdout, "W:" __VA_ARGS__)
#define LOGI(...) fprintf(stdout, "I:" __VA_ARGS__)
@@ -44,6 +44,8 @@ typedef struct fstab_rec Volume;
// fopen a file, mounting volumes and making parent dirs as necessary.
FILE* fopen_path(const char *path, const char *mode);
+void ui_print(const char* format, ...);
+
#ifdef __cplusplus
}
#endif