aboutsummaryrefslogtreecommitdiffstats
path: root/verifier_test.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-05-14 11:03:02 -0700
committerDoug Zongker <dougz@android.com>2013-05-21 11:18:38 -0700
commit7c3ae45ef9306d2ff4b491e0488c8849bf15ce90 (patch)
tree1fe30d8091a86909ed9705ea6983a1b051a07620 /verifier_test.cpp
parent4e21482d979f6f81b34f92e664adf137555d4504 (diff)
downloadbootable_recovery-7c3ae45ef9306d2ff4b491e0488c8849bf15ce90.zip
bootable_recovery-7c3ae45ef9306d2ff4b491e0488c8849bf15ce90.tar.gz
bootable_recovery-7c3ae45ef9306d2ff4b491e0488c8849bf15ce90.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 'verifier_test.cpp')
-rw-r--r--verifier_test.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/verifier_test.cpp b/verifier_test.cpp
index 79c5578..2ef52a0 100644
--- a/verifier_test.cpp
+++ b/verifier_test.cpp
@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <stdarg.h>
+#include "common.h"
#include "verifier.h"
#include "ui.h"
@@ -113,13 +114,10 @@ class FakeUI : public RecoveryUI {
bool IsTextVisible() { return false; }
bool WasTextEverVisible() { return false; }
void Print(const char* fmt, ...) {
- char buf[256];
va_list ap;
va_start(ap, fmt);
- vsnprintf(buf, 256, fmt, ap);
+ vfprintf(stderr, fmt, ap);
va_end(ap);
-
- fputs(buf, stderr);
}
void StartMenu(const char* const * headers, const char* const * items,
@@ -128,6 +126,14 @@ class FakeUI : public RecoveryUI {
void EndMenu() { }
};
+void
+ui_print(const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stdout, format, ap);
+ va_end(ap);
+}
+
int main(int argc, char **argv) {
if (argc < 2 || argc > 4) {
fprintf(stderr, "Usage: %s [-f4 | -file <keys>] <package>\n", argv[0]);